More cleanup

This commit is contained in:
Benoit Marty 2020-09-30 12:30:21 +02:00
parent 42a3a64b0d
commit f58829130a
2 changed files with 8 additions and 8 deletions

View File

@ -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)

View File

@ -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