From b37600f536c8c3d076e5eaca37f570d8a42ec8da Mon Sep 17 00:00:00 2001 From: Valere Date: Tue, 17 Mar 2020 10:43:48 +0100 Subject: [PATCH] QuickFix / key banner not clickable --- CHANGES.md | 1 + .../java/im/vector/riotx/core/ui/views/KeysBackupBanner.kt | 1 + .../settings/KeysBackupSettingsRecyclerViewController.kt | 6 +++++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 157f528747..c2f7011c41 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -11,6 +11,7 @@ Bugfix 🐛: - Message transitions in encrypted rooms are jarring #518 - Images that failed to send are waiting to be sent forever #1145 - Fix / Crashed when trying to send a gif from the Gboard #1136 + - Fix / Cannot click on key backup banner when new keys are available Translations 🗣: - diff --git a/vector/src/main/java/im/vector/riotx/core/ui/views/KeysBackupBanner.kt b/vector/src/main/java/im/vector/riotx/core/ui/views/KeysBackupBanner.kt index 7ce394b954..8d314f9e58 100755 --- a/vector/src/main/java/im/vector/riotx/core/ui/views/KeysBackupBanner.kt +++ b/vector/src/main/java/im/vector/riotx/core/ui/views/KeysBackupBanner.kt @@ -123,6 +123,7 @@ class KeysBackupBanner @JvmOverloads constructor( is State.Setup -> { delegate?.setupKeysBackup() } + is State.Update, is State.Recover -> { delegate?.recoverKeysBackup() } diff --git a/vector/src/main/java/im/vector/riotx/features/crypto/keysbackup/settings/KeysBackupSettingsRecyclerViewController.kt b/vector/src/main/java/im/vector/riotx/features/crypto/keysbackup/settings/KeysBackupSettingsRecyclerViewController.kt index 4f2d806ce3..1fec404f7d 100644 --- a/vector/src/main/java/im/vector/riotx/features/crypto/keysbackup/settings/KeysBackupSettingsRecyclerViewController.kt +++ b/vector/src/main/java/im/vector/riotx/features/crypto/keysbackup/settings/KeysBackupSettingsRecyclerViewController.kt @@ -31,10 +31,12 @@ import im.vector.riotx.core.epoxy.loadingItem import im.vector.riotx.core.resources.StringProvider import im.vector.riotx.core.ui.list.GenericItem import im.vector.riotx.core.ui.list.genericItem +import im.vector.riotx.features.settings.VectorPreferences import java.util.UUID import javax.inject.Inject class KeysBackupSettingsRecyclerViewController @Inject constructor(private val stringProvider: StringProvider, + private val vectorPreferences: VectorPreferences, private val session: Session) : TypedEpoxyController() { var listener: Listener? = null @@ -149,7 +151,9 @@ class KeysBackupSettingsRecyclerViewController @Inject constructor(private val s description(keyVersionResult?.algorithm ?: "") } - buildKeysBackupTrust(data.keysBackupVersionTrust) + if (vectorPreferences.developerMode()) { + buildKeysBackupTrust(data.keysBackupVersionTrust) + } } // Footer