mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-09-27 20:26:33 +02:00
Removing the check to see if the feed is different before sending it to the UI.
This commit is contained in:
@@ -63,9 +63,9 @@ abstract class FeedViewModel(val localFilter: FeedFilter<Note>): ViewModel() {
|
||||
val oldNotesState = feedContent.value
|
||||
if (oldNotesState is FeedState.Loaded) {
|
||||
// Using size as a proxy for has changed.
|
||||
if (notes != oldNotesState.feed.value) {
|
||||
//if (notes != oldNotesState.feed.value) {
|
||||
updateFeed(notes)
|
||||
}
|
||||
//}
|
||||
} else {
|
||||
updateFeed(notes)
|
||||
}
|
||||
|
@@ -38,9 +38,7 @@ open class LnZapFeedViewModel(val dataSource: FeedFilter<Pair<Note, Note>>): Vie
|
||||
val oldNotesState = feedContent.value
|
||||
if (oldNotesState is LnZapFeedState.Loaded) {
|
||||
// Using size as a proxy for has changed.
|
||||
if (notes.size != oldNotesState.feed.value.size || notes.firstOrNull() != oldNotesState.feed.value.firstOrNull()) {
|
||||
updateFeed(notes)
|
||||
}
|
||||
updateFeed(notes)
|
||||
} else {
|
||||
updateFeed(notes)
|
||||
}
|
||||
|
@@ -42,9 +42,7 @@ open class UserFeedViewModel(val dataSource: FeedFilter<User>): ViewModel() {
|
||||
val oldNotesState = feedContent.value
|
||||
if (oldNotesState is UserFeedState.Loaded) {
|
||||
// Using size as a proxy for has changed.
|
||||
if (notes.size != oldNotesState.feed.value.size || notes.firstOrNull() != oldNotesState.feed.value.firstOrNull()) {
|
||||
updateFeed(notes)
|
||||
}
|
||||
updateFeed(notes)
|
||||
} else {
|
||||
updateFeed(notes)
|
||||
}
|
||||
|
Reference in New Issue
Block a user