From b9628301ecd3a017052433808d2e456931db31d7 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Thu, 29 Aug 2024 16:40:50 +0200 Subject: [PATCH] timeline: beef up comment around `TimelineEventContext::should_add_new_items` --- crates/matrix-sdk-ui/src/timeline/event_handler.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/matrix-sdk-ui/src/timeline/event_handler.rs b/crates/matrix-sdk-ui/src/timeline/event_handler.rs index 29df895e0..3d8a3509a 100644 --- a/crates/matrix-sdk-ui/src/timeline/event_handler.rs +++ b/crates/matrix-sdk-ui/src/timeline/event_handler.rs @@ -105,6 +105,12 @@ pub(super) struct TimelineEventContext { pub(super) read_receipts: IndexMap, pub(super) is_highlighted: bool, pub(super) flow: Flow, + + /// If the event represents a new item, should it be added to the timeline? + /// + /// This controls whether a new timeline *may* be added. If the update kind + /// is about an update to an existing timeline item (redaction, edit, + /// reaction, etc.), it's always handled by default. pub(super) should_add_new_items: bool, }