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`.
This commit is contained in:
Ivan Enderlin
2023-06-16 14:49:08 +02:00
parent bae1a71c81
commit 646fb35b3a
2 changed files with 14 additions and 2 deletions

View File

@@ -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

View File

@@ -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,
},