diff --git a/crates/matrix-sdk-ui/src/room_list/mod.rs b/crates/matrix-sdk-ui/src/room_list/mod.rs index 06c9a3f9c..ceeb05d12 100644 --- a/crates/matrix-sdk-ui/src/room_list/mod.rs +++ b/crates/matrix-sdk-ui/src/room_list/mod.rs @@ -36,7 +36,7 @@ //! `RoomList` works with 2 Sliding Sync List: //! //! * `all_rooms` (refered by the constant [`ALL_ROOMS_LIST_NAME`]) is the main -//! list. It's goal is to load all the user' rooms. It starts with a +//! list. Its goal is to load all the user' rooms. It starts with a //! [`SlidingSyncMode::Selective`] sync-mode with a small range (i.e. a small //! set of rooms) to load the first rooms quickly, and then updates to a //! [`SlidingSyncMode::Growing`] sync-mode to load the remaining rooms “in the @@ -173,7 +173,7 @@ impl RoomList { } } - /// Get the actual state of the state machine. + /// Get the current state of the state machine. pub fn state(&self) -> State { self.state.get() } @@ -348,10 +348,10 @@ pub enum State { /// That's the first initial state. Init, - /// At this state, the first rooms starts to be synced. + /// At this state, the first rooms start to be synced. FirstRooms, - /// At this state, all rooms starts to be synced. + /// At this state, all rooms start to be synced. AllRooms, /// This state is the cruising speed, i.e. the “normal” state, where nothing @@ -654,9 +654,6 @@ mod tests { let room_list = new_room_list().await?; let sliding_sync = room_list.sliding_sync(); - // List is absent. - assert_eq!(sliding_sync.on_list(VISIBLE_ROOMS_LIST_NAME, |_list| ready(())).await, None); - // List is present, in Selective mode. assert_eq!( sliding_sync diff --git a/crates/matrix-sdk/src/sliding_sync/list/mod.rs b/crates/matrix-sdk/src/sliding_sync/list/mod.rs index d5e89048c..9f9ab1a7b 100644 --- a/crates/matrix-sdk/src/sliding_sync/list/mod.rs +++ b/crates/matrix-sdk/src/sliding_sync/list/mod.rs @@ -134,6 +134,10 @@ impl SlidingSyncList { /// /// There's no guarantee of ordering between items emitted by this stream /// and those emitted by other streams exposed on this structure. + /// + /// The first part of the returned tuple is the actual room list entries, + /// and the second part is the `Stream` to receive updates on the room list + /// entries. pub fn room_list_stream( &self, ) -> (Vector, impl Stream>) {