From 531d8d220dff3b59bc23ada8e29897e95fa81bc2 Mon Sep 17 00:00:00 2001 From: Stefan Ceriu Date: Fri, 18 Aug 2023 11:16:58 +0300 Subject: [PATCH] Remove is_encrypted from room info as it's not used and it might do network calls and slow down room list updates --- bindings/matrix-sdk-ffi/src/room_info.rs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/bindings/matrix-sdk-ffi/src/room_info.rs b/bindings/matrix-sdk-ffi/src/room_info.rs index 5ccf11031..49f4afb29 100644 --- a/bindings/matrix-sdk-ffi/src/room_info.rs +++ b/bindings/matrix-sdk-ffi/src/room_info.rs @@ -12,10 +12,6 @@ pub struct RoomInfo { topic: Option, avatar_url: Option, is_direct: bool, - /// Whether the room is encrypted. - /// - /// Currently always `None` (unknown) for invited rooms. - is_encrypted: Option, is_public: bool, is_space: bool, is_tombstoned: bool, @@ -42,10 +38,6 @@ impl RoomInfo { topic: inner.topic(), avatar_url: inner.avatar_url().map(Into::into), is_direct: inner.is_direct().await?, - is_encrypted: match inner.state() { - RoomState::Invited => None, - _ => Some(inner.is_encrypted().await?), - }, is_public: inner.is_public(), is_space: inner.is_space(), is_tombstoned: inner.is_tombstoned(),