From 702d21fbc38fcad79f09b4d0cb2bd7a27edbf207 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 18 Nov 2020 15:27:59 +0100 Subject: [PATCH] No encryption for public room (#1314) --- .../createroom/CreateRoomController.kt | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/roomdirectory/createroom/CreateRoomController.kt b/vector/src/main/java/im/vector/app/features/roomdirectory/createroom/CreateRoomController.kt index 740e73b955..235fddf9d4 100644 --- a/vector/src/main/java/im/vector/app/features/roomdirectory/createroom/CreateRoomController.kt +++ b/vector/src/main/java/im/vector/app/features/roomdirectory/createroom/CreateRoomController.kt @@ -116,22 +116,23 @@ class CreateRoomController @Inject constructor(private val stringProvider: Strin listener?.setAliasLocalPart(value) } } - } - formSwitchItem { - id("encryption") - enabled(enableFormElement) - title(stringProvider.getString(R.string.create_room_encryption_title)) - summary( - if (viewState.hsAdminHasDisabledE2E) { - stringProvider.getString(R.string.settings_hs_admin_e2e_disabled) - } else { - stringProvider.getString(R.string.create_room_encryption_description) - } - ) - switchChecked(viewState.isEncrypted) + } else { + formSwitchItem { + id("encryption") + enabled(enableFormElement) + title(stringProvider.getString(R.string.create_room_encryption_title)) + summary( + if (viewState.hsAdminHasDisabledE2E) { + stringProvider.getString(R.string.settings_hs_admin_e2e_disabled) + } else { + stringProvider.getString(R.string.create_room_encryption_description) + } + ) + switchChecked(viewState.isEncrypted) - listener { value -> - listener?.setIsEncrypted(value) + listener { value -> + listener?.setIsEncrypted(value) + } } } formAdvancedToggleItem {