Skip to content

Commit

Permalink
test(ui): Update room_list_service integration tests.
Browse files Browse the repository at this point in the history
This patch updates the `room_list_service` integration test suite based
on the previous commit that changes `RoomListEntry` by `Room`.
  • Loading branch information
Hywan committed Jun 20, 2024
1 parent 52f9ae1 commit ead4061
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 315 deletions.
3 changes: 1 addition & 2 deletions crates/matrix-sdk-ui/src/room_list_service/filters/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,7 @@ use super::Room;

/// A trait “alias” that represents a _filter_.
///
/// A filter is simply a function that receives a `&RoomListEntry` and returns a
/// `bool`.
/// A filter is simply a function that receives a `&Room` and returns a `bool`.
pub trait Filter: Fn(&Room) -> bool {}

impl<F> Filter for F where F: Fn(&Room) -> bool {}
Expand Down
1 change: 0 additions & 1 deletion crates/matrix-sdk-ui/src/room_list_service/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ use std::{
use async_stream::stream;
use eyeball::{SharedObservable, Subscriber};
use futures_util::{pin_mut, Stream, StreamExt};
pub use matrix_sdk::RoomListEntry;
use matrix_sdk::{
event_cache::EventCacheError, sliding_sync::Ranges, Client, Error as SlidingSyncError,
SlidingSync, SlidingSyncList, SlidingSyncListBuilder, SlidingSyncMode,
Expand Down
8 changes: 4 additions & 4 deletions crates/matrix-sdk-ui/src/room_list_service/room_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,10 +300,10 @@ pub enum RoomListLoadingState {
/// The maximum number of rooms a [`RoomList`] contains.
///
/// It does not mean that there are exactly this many rooms to display.
/// Usually, the room entries are represented by
/// [`RoomListEntry`]. The room entry might have been synced or not
/// synced yet, but we know for sure (from the server), that there will
/// be this amount of rooms in the list at the end.
/// Usually, the room entries are represented by [`Room`]. The room
/// entry might have been synced or not synced yet, but we know for sure
/// (from the server), that there will be this amount of rooms in the
/// list at the end.
///
/// Note that it's an `Option`, because it may be possible that the
/// server did miss to send us this value. It's up to you, dear reader,
Expand Down
Loading

0 comments on commit ead4061

Please sign in to comment.