mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-04-09 20:39:24 +02:00
Removing the check to see if the feed is different before sending it to the UI.
This commit is contained in:
parent
61920ed31a
commit
dbd2f308c2
@ -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)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user