Skip to content

Commit

Permalink
ffi: remove is_encrypted field from RoomInfo
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jmartinesp committed Jul 4, 2024
1 parent 03d4a30 commit ad4d24f
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions bindings/matrix-sdk-ffi/src/room_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ pub struct RoomInfo {
is_space: bool,
is_tombstoned: bool,
is_favourite: bool,
is_encrypted: bool,
canonical_alias: Option<String>,
alternative_aliases: Vec<String>,
membership: Membership,
Expand Down Expand Up @@ -77,7 +76,6 @@ impl RoomInfo {
is_space: room.is_space(),
is_tombstoned: room.is_tombstoned(),
is_favourite: room.is_favourite(),
is_encrypted: room.is_encrypted().await.unwrap_or(false),
canonical_alias: room.canonical_alias().map(Into::into),
alternative_aliases: room.alt_aliases().into_iter().map(Into::into).collect(),
membership: room.state().into(),
Expand Down

0 comments on commit ad4d24f

Please sign in to comment.