From 646fb35b3a2371dcaca00addac426fbcd2147f34 Mon Sep 17 00:00:00 2001 From: Ivan Enderlin Date: Fri, 16 Jun 2023 14:49:08 +0200 Subject: [PATCH] feat(ui): Add `bump_event_types` for `all_rooms` in `RoomList`. This patch configures the `bump_event_types` paramter for the `all_rooms` list in `RoomList`. --- crates/matrix-sdk-ui/src/room_list/mod.rs | 11 +++++++++-- crates/matrix-sdk-ui/tests/integration/room_list.rs | 5 +++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/crates/matrix-sdk-ui/src/room_list/mod.rs b/crates/matrix-sdk-ui/src/room_list/mod.rs index 283f76dca0c..6b7d9975af3 100644 --- a/crates/matrix-sdk-ui/src/room_list/mod.rs +++ b/crates/matrix-sdk-ui/src/room_list/mod.rs @@ -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::*; @@ -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 diff --git a/crates/matrix-sdk-ui/tests/integration/room_list.rs b/crates/matrix-sdk-ui/tests/integration/room_list.rs index 4d7ed19138c..b5f51b90ecb 100644 --- a/crates/matrix-sdk-ui/tests/integration/room_list.rs +++ b/crates/matrix-sdk-ui/tests/integration/room_list.rs @@ -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, },