mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-04-10 04:49:25 +02:00
Trying to solve Notifications crash
This commit is contained in:
parent
da949fa9fd
commit
bce30ce5de
@ -50,7 +50,7 @@ open class CardFeedViewModel(val dataSource: FeedFilter<Note>): ViewModel() {
|
||||
val newCards = convertToCard(notes.minus(lastNotesCopy))
|
||||
if (newCards.isNotEmpty()) {
|
||||
lastNotes = notes
|
||||
updateFeed((oldNotesState.feed.value + newCards).sortedBy { it.createdAt() }.reversed())
|
||||
updateFeed((oldNotesState.feed.value + newCards).distinctBy { it.id() }.sortedBy { it.createdAt() }.reversed())
|
||||
}
|
||||
} else {
|
||||
val cards = convertToCard(notes)
|
||||
|
Loading…
x
Reference in New Issue
Block a user