Remove is_encrypted from room info as it's not used and it might do network calls and slow down room list updates

This commit is contained in:
Stefan Ceriu
2023-08-18 11:16:58 +03:00
parent 92284a353e
commit 531d8d220d

View File

@@ -12,10 +12,6 @@ pub struct RoomInfo {
topic: Option<String>,
avatar_url: Option<String>,
is_direct: bool,
/// Whether the room is encrypted.
///
/// Currently always `None` (unknown) for invited rooms.
is_encrypted: Option<bool>,
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(),