Skip to content

Commit ad4d24f

Browse files
committed
ffi: remove is_encrypted field from RoomInfo
It turns out this will cause a network request if the encryption info hasn't been loaded before, which is the case for opening a client in offline mode. It will slow down displaying the room list or loading the room info in general.
1 parent 03d4a30 commit ad4d24f

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

bindings/matrix-sdk-ffi/src/room_info.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ pub struct RoomInfo {
2323
is_space: bool,
2424
is_tombstoned: bool,
2525
is_favourite: bool,
26-
is_encrypted: bool,
2726
canonical_alias: Option<String>,
2827
alternative_aliases: Vec<String>,
2928
membership: Membership,
@@ -77,7 +76,6 @@ impl RoomInfo {
7776
is_space: room.is_space(),
7877
is_tombstoned: room.is_tombstoned(),
7978
is_favourite: room.is_favourite(),
80-
is_encrypted: room.is_encrypted().await.unwrap_or(false),
8179
canonical_alias: room.canonical_alias().map(Into::into),
8280
alternative_aliases: room.alt_aliases().into_iter().map(Into::into).collect(),
8381
membership: room.state().into(),

0 commit comments

Comments
 (0)