Skip to content

Commit 5a8b3af

Browse files
committed
doc(sdk): Update an inline comment.
1 parent 82b17e1 commit 5a8b3af

File tree

1 file changed

+4
-1
lines changed
  • crates/matrix-sdk/src/event_cache/caches/thread

1 file changed

+4
-1
lines changed

crates/matrix-sdk/src/event_cache/caches/thread/state.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,10 @@ impl<'a> ThreadEventCacheStateLockWriteGuard<'a> {
300300
return Ok(Vec::new());
301301
}
302302

303-
// Remove the duplicated events from the thread chunk.
303+
// 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.
304307
self.remove_events(in_memory_duplicated_event_ids, in_store_duplicated_event_ids).await?;
305308

306309
self.state.thread_linked_chunk.push_live_events(None, &events);

0 commit comments

Comments
 (0)