mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-15 19:45:34 -04:00
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:
@@ -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
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user