From c9b02ad068e1a65645dbb9811ce359791437202b Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Mon, 18 Dec 2023 16:12:25 +0100 Subject: [PATCH] doc: document `SlidingSyncRoomInner::timeline_queue` a bit better --- crates/matrix-sdk/src/sliding_sync/room.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crates/matrix-sdk/src/sliding_sync/room.rs b/crates/matrix-sdk/src/sliding_sync/room.rs index 11d07f4a8..26381efd8 100644 --- a/crates/matrix-sdk/src/sliding_sync/room.rs +++ b/crates/matrix-sdk/src/sliding_sync/room.rs @@ -271,6 +271,13 @@ struct SlidingSyncRoomInner { /// A queue of received events, used to build a /// [`Timeline`][crate::Timeline]. + /// + /// Given a room, its size is theoretically unbounded: we'll accumulate + /// events in this list, until we reach a limited sync, in which case + /// we'll clear it. + /// + /// When persisting the room, this queue is truncated to keep only the last + /// N events. timeline_queue: RwLock>, }