diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java index 6827ddaaf..5175e0096 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java @@ -340,6 +340,8 @@ public class SearchFragment extends BaseListFragment searchBinding.suggestionsList.scrollToPosition(0)); if (suggestionsPanelVisible && isErrorPanelVisible()) { hideLoading(); diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/search/SuggestionListAdapter.java b/app/src/main/java/org/schabi/newpipe/fragments/list/search/SuggestionListAdapter.java index f859c9e54..856ba22f1 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/search/SuggestionListAdapter.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/search/SuggestionListAdapter.java @@ -80,13 +80,14 @@ public class SuggestionListAdapter @Override public boolean areItemsTheSame(@NonNull final SuggestionItem oldItem, @NonNull final SuggestionItem newItem) { - return oldItem.query.equals(newItem.query); + return oldItem.fromHistory == newItem.fromHistory + && oldItem.query.equals(newItem.query); } @Override public boolean areContentsTheSame(@NonNull final SuggestionItem oldItem, @NonNull final SuggestionItem newItem) { - return oldItem.equals(newItem); + return true; // items' contents never change; the list of items themselves does } } }