chore(ui): Address feedbacks.
This commit is contained in:
parent
4a62949b6c
commit
ac7a576035
|
@ -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
|
||||
|
|
|
@ -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<RoomListEntry>, impl Stream<Item = VectorDiff<RoomListEntry>>) {
|
||||
|
|
Loading…
Reference in New Issue