Doesn't update if it returned the same reference for the list.

This commit is contained in:
Vitor Pamplona
2023-05-11 18:15:48 -04:00
parent 19a58bb669
commit aa60367c72
@@ -98,7 +98,8 @@ abstract class FeedViewModel(val localFilter: FeedFilter<Note>) : ViewModel() {
val oldNotesState = _feedContent.value
if (localFilter is AdditiveFeedFilter && oldNotesState is FeedState.Loaded) {
val newList = localFilter.updateListWith(oldNotesState.feed.value, newItems.toSet())
updateFeed(newList)
if (newList !== oldNotesState.feed.value)
updateFeed(newList)
} else {
// Refresh Everything
refreshSuspended()