Fix copy of cancel bootstrap

This commit is contained in:
Valere 2020-06-29 11:39:46 +02:00
parent 51b7a0aeae
commit caa7709090
2 changed files with 4 additions and 11 deletions

View File

@ -77,24 +77,17 @@ class BootstrapBottomSheet : VectorBaseBottomSheetDialogFragment() {
KeepItSafeDialog().show(requireActivity()) KeepItSafeDialog().show(requireActivity())
} }
is BootstrapViewEvents.SkipBootstrap -> { is BootstrapViewEvents.SkipBootstrap -> {
promptSkip(event.genKeyOption) promptSkip()
} }
} }
} }
} }
private fun promptSkip(genKeyOption: Boolean) { private fun promptSkip() {
AlertDialog.Builder(requireContext()) AlertDialog.Builder(requireContext())
.setTitle(R.string.are_you_sure) .setTitle(R.string.are_you_sure)
.setMessage(if (genKeyOption) R.string.bootstrap_skip_text else R.string.bootstrap_skip_text_no_gen_key) .setMessage(R.string.bootstrap_cancel_text)
.setPositiveButton(R.string._continue, null) .setPositiveButton(R.string._continue, null)
.apply {
if (genKeyOption) {
setNeutralButton(R.string.generate_message_key) { _, _ ->
viewModel.handle(BootstrapActions.DoInitializeGeneratedKey)
}
}
}
.setNegativeButton(R.string.skip) { _, _ -> .setNegativeButton(R.string.skip) { _, _ ->
dismiss() dismiss()
} }

View File

@ -2341,7 +2341,7 @@ Not all features in Riot are implemented in RiotX yet. Main missing (and coming
<string name="bootstrap_skip_text">Setting a Recovery Passphrase lets you secure &amp; unlock encrypted messages and trust.\n\nIf you dont want to set a Message Password, generate a Message Key instead.</string> <string name="bootstrap_skip_text">Setting a Recovery Passphrase lets you secure &amp; unlock encrypted messages and trust.\n\nIf you dont want to set a Message Password, generate a Message Key instead.</string>
<string name="bootstrap_skip_text_no_gen_key">Setting a Recovery Passphrase lets you secure &amp; unlock encrypted messages and trust.</string> <string name="bootstrap_skip_text_no_gen_key">Setting a Recovery Passphrase lets you secure &amp; unlock encrypted messages and trust.</string>
<string name="bootstrap_cancel_text">If you cancel now, you may lose encrypted messages &amp; data if you lose access to your logins.\n\nYou can also set up Secure Backup &amp; manage your keys in Settings.</string>
<string name="encryption_enabled">Encryption enabled</string> <string name="encryption_enabled">Encryption enabled</string>
<string name="encryption_enabled_tile_description">Messages in this room are end-to-end encrypted. Learn more &amp; verify users in their profile.</string> <string name="encryption_enabled_tile_description">Messages in this room are end-to-end encrypted. Learn more &amp; verify users in their profile.</string>