From ad4d24f7d0bbc91dffe2c21efc2ce3492cbd6719 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Mart=C3=ADn?= Date: Thu, 4 Jul 2024 13:52:27 +0200 Subject: [PATCH] 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. --- bindings/matrix-sdk-ffi/src/room_info.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/bindings/matrix-sdk-ffi/src/room_info.rs b/bindings/matrix-sdk-ffi/src/room_info.rs index 9fa63f36500..8e89584a001 100644 --- a/bindings/matrix-sdk-ffi/src/room_info.rs +++ b/bindings/matrix-sdk-ffi/src/room_info.rs @@ -23,7 +23,6 @@ pub struct RoomInfo { is_space: bool, is_tombstoned: bool, is_favourite: bool, - is_encrypted: bool, canonical_alias: Option, alternative_aliases: Vec, membership: Membership, @@ -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(),