|
|
@ -182,48 +182,40 @@ class RustMatrixRoom( |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
override val name: String? |
|
|
|
override val name: String? |
|
|
|
get() { |
|
|
|
get() = runCatching { roomListItem.name() }.getOrDefault(null) |
|
|
|
return roomListItem.name() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
override val displayName: String |
|
|
|
override val displayName: String |
|
|
|
get() { |
|
|
|
get() = runCatching { innerRoom.displayName() }.getOrDefault("") |
|
|
|
return innerRoom.displayName() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
override val topic: String? |
|
|
|
override val topic: String? |
|
|
|
get() { |
|
|
|
get() = runCatching { innerRoom.topic() }.getOrDefault(null) |
|
|
|
return innerRoom.topic() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
override val avatarUrl: String? |
|
|
|
override val avatarUrl: String? |
|
|
|
get() { |
|
|
|
get() = runCatching { roomListItem.avatarUrl() ?: innerRoom.avatarUrl() }.getOrDefault(null) |
|
|
|
return roomListItem.avatarUrl() ?: innerRoom.avatarUrl() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
override val isEncrypted: Boolean |
|
|
|
override val isEncrypted: Boolean |
|
|
|
get() = runCatching { innerRoom.isEncrypted() }.getOrDefault(false) |
|
|
|
get() = runCatching { innerRoom.isEncrypted() }.getOrDefault(false) |
|
|
|
|
|
|
|
|
|
|
|
override val alias: String? |
|
|
|
override val alias: String? |
|
|
|
get() = innerRoom.canonicalAlias() |
|
|
|
get() = runCatching { innerRoom.canonicalAlias() }.getOrDefault(null) |
|
|
|
|
|
|
|
|
|
|
|
override val alternativeAliases: List<String> |
|
|
|
override val alternativeAliases: List<String> |
|
|
|
get() = innerRoom.alternativeAliases() |
|
|
|
get() = runCatching { innerRoom.alternativeAliases() }.getOrDefault(emptyList()) |
|
|
|
|
|
|
|
|
|
|
|
override val isPublic: Boolean |
|
|
|
override val isPublic: Boolean |
|
|
|
get() = innerRoom.isPublic() |
|
|
|
get() = runCatching { innerRoom.isPublic() }.getOrDefault(false) |
|
|
|
|
|
|
|
|
|
|
|
override val isSpace: Boolean |
|
|
|
override val isSpace: Boolean |
|
|
|
get() = innerRoom.isSpace() |
|
|
|
get() = runCatching { innerRoom.isSpace() }.getOrDefault(false) |
|
|
|
|
|
|
|
|
|
|
|
override val isDirect: Boolean |
|
|
|
override val isDirect: Boolean |
|
|
|
get() = innerRoom.isDirect() |
|
|
|
get() = runCatching { innerRoom.isDirect() }.getOrDefault(false) |
|
|
|
|
|
|
|
|
|
|
|
override val joinedMemberCount: Long |
|
|
|
override val joinedMemberCount: Long |
|
|
|
get() = innerRoom.joinedMembersCount().toLong() |
|
|
|
get() = runCatching { innerRoom.joinedMembersCount().toLong() }.getOrDefault(0) |
|
|
|
|
|
|
|
|
|
|
|
override val activeMemberCount: Long |
|
|
|
override val activeMemberCount: Long |
|
|
|
get() = innerRoom.activeMembersCount().toLong() |
|
|
|
get() = runCatching { innerRoom.activeMembersCount().toLong() }.getOrDefault(0) |
|
|
|
|
|
|
|
|
|
|
|
override suspend fun updateMembers() { |
|
|
|
override suspend fun updateMembers() { |
|
|
|
val useCache = membersStateFlow.value is MatrixRoomMembersState.Unknown |
|
|
|
val useCache = membersStateFlow.value is MatrixRoomMembersState.Unknown |
|
|
|