From b7c83d3d985682193d2beb16d509068c4e9410b1 Mon Sep 17 00:00:00 2001 From: Ivan Enderlin Date: Wed, 4 Dec 2024 17:42:32 +0100 Subject: [PATCH] doc(ui): Add more documentation for `AllRemoteEvents`. --- .../src/timeline/controller/observable_items.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crates/matrix-sdk-ui/src/timeline/controller/observable_items.rs b/crates/matrix-sdk-ui/src/timeline/controller/observable_items.rs index 16074a20051..5d872f971b2 100644 --- a/crates/matrix-sdk-ui/src/timeline/controller/observable_items.rs +++ b/crates/matrix-sdk-ui/src/timeline/controller/observable_items.rs @@ -429,6 +429,10 @@ impl AllRemoteEvents { } } + /// Notify that a timeline item has been inserted at + /// `new_timeline_item_index`. If `event_index` is `Some(_)`, it means the + /// remote event at `event_index` must be mapped to + /// `new_timeline_item_index`. fn timeline_item_has_been_inserted_at( &mut self, new_timeline_item_index: usize, @@ -443,6 +447,9 @@ impl AllRemoteEvents { } } + /// Notify that a timeline item has been removed at + /// `new_timeline_item_index`. If `event_index` is `Some(_)`, it means the + /// remote event at `event_index` must be unmapped. fn timeline_item_has_been_removed_at(&mut self, timeline_item_index_to_remove: usize) { for event_meta in self.0.iter_mut() { let mut remove_timeline_item_index = false;