Skip to content

Commit

Permalink
feat(ffi): Add RoomListEntriesDynamicFilterKind::None.
Browse files Browse the repository at this point in the history
  • Loading branch information
Hywan committed Sep 21, 2023
1 parent c256452 commit 95ea5e9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bindings/matrix-sdk-ffi/src/room_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ use matrix_sdk::{
RoomListEntry as MatrixRoomListEntry,
};
use matrix_sdk_ui::room_list_service::filters::{
new_filter_all, new_filter_fuzzy_match_room_name, new_filter_normalized_match_room_name,
new_filter_all, new_filter_fuzzy_match_room_name, new_filter_none,
new_filter_normalized_match_room_name,
};
use tokio::sync::RwLock;

Expand Down Expand Up @@ -370,6 +371,7 @@ impl RoomListDynamicEntriesController {

match kind {
Kind::All => self.inner.set_filter(new_filter_all()),
Kind::None => self.inner.set_filter(new_filter_none()),
Kind::NormalizedMatchRoomName { pattern } => {
self.inner.set_filter(new_filter_normalized_match_room_name(&self.client, &pattern))
}
Expand All @@ -391,6 +393,7 @@ impl RoomListDynamicEntriesController {
#[derive(uniffi::Enum)]
pub enum RoomListEntriesDynamicFilterKind {
All,
None,
NormalizedMatchRoomName { pattern: String },
FuzzyMatchRoomName { pattern: String },
}
Expand Down

0 comments on commit 95ea5e9

Please sign in to comment.