mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-04 10:32:34 +00:00
Clearer code.
This commit is contained in:
+2
-2
@@ -36,8 +36,8 @@ fun TimelineItemEncryptedView(
|
|||||||
onContentLayoutChanged: (ContentAvoidingLayoutData) -> Unit,
|
onContentLayoutChanged: (ContentAvoidingLayoutData) -> Unit,
|
||||||
modifier: Modifier = Modifier
|
modifier: Modifier = Modifier
|
||||||
) {
|
) {
|
||||||
val (textId, iconId) = if (content.data is UnableToDecryptContent.Data.MegolmV1AesSha2 &&
|
val isMembershipUtd = (content.data as? UnableToDecryptContent.Data.MegolmV1AesSha2)?.utdCause == UtdCause.Membership
|
||||||
content.data.utdCause == UtdCause.Membership) {
|
val (textId, iconId) = if (isMembershipUtd) {
|
||||||
(CommonStrings.common_unable_to_decrypt_no_access to CompoundDrawables.ic_compound_block)
|
(CommonStrings.common_unable_to_decrypt_no_access to CompoundDrawables.ic_compound_block)
|
||||||
} else {
|
} else {
|
||||||
(CommonStrings.common_waiting_for_decryption_key to CompoundDrawables.ic_compound_time)
|
(CommonStrings.common_waiting_for_decryption_key to CompoundDrawables.ic_compound_time)
|
||||||
|
|||||||
Reference in New Issue
Block a user