Skip to content

Commit

Permalink
feat(ui): Add bump_event_types for all_rooms in RoomList
Browse files Browse the repository at this point in the history
feat(ui): Add `bump_event_types` for `all_rooms` in `RoomList`
  • Loading branch information
Hywan authored Jun 16, 2023
2 parents bae1a71 + 646fb35 commit 1660c71
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
11 changes: 9 additions & 2 deletions crates/matrix-sdk-ui/src/room_list/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ use matrix_sdk::{
};
pub use room::*;
use ruma::{
api::client::sync::sync_events::v4::SyncRequestListFilters, assign, events::StateEventType,
api::client::sync::sync_events::v4::SyncRequestListFilters,
assign,
events::{StateEventType, TimelineEventType},
OwnedRoomId, RoomId,
};
pub use state::*;
Expand Down Expand Up @@ -117,7 +119,12 @@ impl RoomList {
is_invite: Some(false),
is_tombstoned: Some(false),
not_room_types: vec!["m.space".to_owned()],
}))),
})))
.bump_event_types(&[
TimelineEventType::RoomMessage,
TimelineEventType::RoomEncrypted,
TimelineEventType::Sticker,
]),
)
.build()
.await
Expand Down
5 changes: 5 additions & 0 deletions crates/matrix-sdk-ui/tests/integration/room_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,11 @@ async fn test_sync_from_init_to_enjoy() -> Result<(), Error> {
"is_tombstoned": false,
"not_room_types": ["m.space"],
},
"bump_event_types": [
"m.room.message",
"m.room.encrypted",
"m.sticker",
],
"sort": ["by_recency", "by_name"],
"timeline_limit": 1,
},
Expand Down

0 comments on commit 1660c71

Please sign in to comment.