Cache must update before updating the screen.
This commit is contained in:
@@ -1406,6 +1406,10 @@ object LocalCache {
|
|||||||
event.editedNote()?.let {
|
event.editedNote()?.let {
|
||||||
checkGetOrCreateNote(it)?.let { editedNote ->
|
checkGetOrCreateNote(it)?.let { editedNote ->
|
||||||
modificationCache.remove(editedNote.idHex)
|
modificationCache.remove(editedNote.idHex)
|
||||||
|
// if it is a new post from the user, must update list of Notes to quickly update the user.
|
||||||
|
if (relay == null) {
|
||||||
|
updateListCache()
|
||||||
|
}
|
||||||
editedNote.liveSet?.innerModifications?.invalidateData()
|
editedNote.liveSet?.innerModifications?.invalidateData()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2132,8 +2136,8 @@ class LocalCacheLiveData {
|
|||||||
fun invalidateData(newNote: Note) {
|
fun invalidateData(newNote: Note) {
|
||||||
bundler.invalidateList(newNote) {
|
bundler.invalidateList(newNote) {
|
||||||
bundledNewNotes ->
|
bundledNewNotes ->
|
||||||
_newEventBundles.emit(bundledNewNotes)
|
|
||||||
LocalCache.updateListCache()
|
LocalCache.updateListCache()
|
||||||
|
_newEventBundles.emit(bundledNewNotes)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user