mirror of
				https://github.com/TeamNewPipe/NewPipe
				synced 2025-11-04 01:03:00 +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:
		@@ -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
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user