Merge pull request #1233 from vector-im/feature/fix_local_echo_no_update
Fix / sending event not always updating
This commit is contained in:
commit
1981d2e9ac
|
@ -28,6 +28,7 @@ Bugfix 🐛:
|
|||
- Cross- Signing | After signin in new session, verification paper trail in DM is off (#1191)
|
||||
- Failed to encrypt message in room (message stays in red), [thanks to pwr22] (#925)
|
||||
- Cross-Signing | web <-> riotX After QR code scan, gossiping fails (#1210)
|
||||
- Local echo are not updated in timeline (for failed & encrypted states)
|
||||
|
||||
Translations 🗣:
|
||||
-
|
||||
|
|
|
@ -171,10 +171,13 @@ internal class DefaultTimeline(
|
|||
val realm = Realm.getInstance(realmConfiguration)
|
||||
backgroundRealm.set(realm)
|
||||
|
||||
roomEntity = RoomEntity.where(realm, roomId = roomId).findFirst()?.also {
|
||||
it.sendingTimelineEvents.addChangeListener { _ ->
|
||||
postSnapshot()
|
||||
roomEntity = RoomEntity.where(realm, roomId = roomId).findFirst()
|
||||
roomEntity?.sendingTimelineEvents?.addChangeListener { events ->
|
||||
// Remove in memory as soon as they are known by database
|
||||
events.forEach { te ->
|
||||
inMemorySendingEvents.removeAll { te.eventId == it.eventId }
|
||||
}
|
||||
postSnapshot()
|
||||
}
|
||||
|
||||
nonFilteredEvents = buildEventQuery(realm).sort(TimelineEventEntityFields.DISPLAY_INDEX, Sort.DESCENDING).findAll()
|
||||
|
|
Loading…
Reference in New Issue