From f58829130a4526d084d0a6ad3af3b8744438aa82 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 30 Sep 2020 12:30:21 +0200 Subject: [PATCH] More cleanup --- .../detail/timeline/factory/EncryptionItemFactory.kt | 12 +++++++----- .../detail/timeline/factory/TimelineItemFactory.kt | 4 +--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/factory/EncryptionItemFactory.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/factory/EncryptionItemFactory.kt index 2ed88cbae9..4f2c8ea63a 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/factory/EncryptionItemFactory.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/factory/EncryptionItemFactory.kt @@ -54,11 +54,13 @@ class EncryptionItemFactory @Inject constructor( val shield: StatusTileTimelineItem.ShieldUIState if (isSafeAlgorithm) { title = stringProvider.getString(R.string.encryption_enabled) - description = if (session.getRoomSummary(event.root.roomId ?: "")?.isDirect.orFalse()) { - stringProvider.getString(R.string.direct_room_encryption_enabled_tile_description) - } else { - stringProvider.getString(R.string.encryption_enabled_tile_description) - } + description = stringProvider.getString( + if (session.getRoomSummary(event.root.roomId ?: "")?.isDirect.orFalse()) { + R.string.direct_room_encryption_enabled_tile_description + } else { + R.string.encryption_enabled_tile_description + } + ) shield = StatusTileTimelineItem.ShieldUIState.BLACK } else { title = stringProvider.getString(R.string.encryption_not_enabled) diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/factory/TimelineItemFactory.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/factory/TimelineItemFactory.kt index 1f99efd08e..a2e01e63cd 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/factory/TimelineItemFactory.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/factory/TimelineItemFactory.kt @@ -64,9 +64,7 @@ class TimelineItemFactory @Inject constructor(private val messageItemFactory: Me EventType.STATE_ROOM_POWER_LEVELS, EventType.REACTION, EventType.REDACTION -> noticeItemFactory.create(event, highlight, callback) - EventType.STATE_ROOM_ENCRYPTION -> { - encryptionItemFactory.create(event, highlight, callback) - } + EventType.STATE_ROOM_ENCRYPTION -> encryptionItemFactory.create(event, highlight, callback) // State room create EventType.STATE_ROOM_CREATE -> roomCreateItemFactory.create(event, callback) // Crypto