We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 82b17e1 commit 5a8b3afCopy full SHA for 5a8b3af
crates/matrix-sdk/src/event_cache/caches/thread/state.rs
@@ -300,7 +300,10 @@ impl<'a> ThreadEventCacheStateLockWriteGuard<'a> {
300
return Ok(Vec::new());
301
}
302
303
- // Remove the duplicated events from the thread chunk.
+ // Remove the old duplicated events.
304
+ //
305
+ // We don't have to worry about the removals can change the position of the
306
+ // existing events, because we are pushing all _new_ `events` at the back.
307
self.remove_events(in_memory_duplicated_event_ids, in_store_duplicated_event_ids).await?;
308
309
self.state.thread_linked_chunk.push_live_events(None, &events);
0 commit comments