mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-12-23 08:30:44 +00:00
Fix wrong icons being set on suggestion items
The diff util wrongly considered as equal two items with the same text but with different `fromHistory` value
This commit is contained in:
parent
e6391a860a
commit
fbf5549182
@ -80,13 +80,14 @@ public class SuggestionListAdapter
|
|||||||
@Override
|
@Override
|
||||||
public boolean areItemsTheSame(@NonNull final SuggestionItem oldItem,
|
public boolean areItemsTheSame(@NonNull final SuggestionItem oldItem,
|
||||||
@NonNull final SuggestionItem newItem) {
|
@NonNull final SuggestionItem newItem) {
|
||||||
return oldItem.query.equals(newItem.query);
|
return oldItem.fromHistory == newItem.fromHistory
|
||||||
|
&& oldItem.query.equals(newItem.query);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean areContentsTheSame(@NonNull final SuggestionItem oldItem,
|
public boolean areContentsTheSame(@NonNull final SuggestionItem oldItem,
|
||||||
@NonNull final SuggestionItem newItem) {
|
@NonNull final SuggestionItem newItem) {
|
||||||
return oldItem.equals(newItem);
|
return true; // items' contents never change; the list of items themselves does
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user