From 26400e6372e0baae76384c32f1cff11f743a7bf4 Mon Sep 17 00:00:00 2001 From: Valere Date: Sat, 1 Feb 2020 15:19:49 +0100 Subject: [PATCH] Prompt before resetting keys --- .../settings/crosssigning/CrossSigningSettingsFragment.kt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/vector/src/main/java/im/vector/riotx/features/settings/crosssigning/CrossSigningSettingsFragment.kt b/vector/src/main/java/im/vector/riotx/features/settings/crosssigning/CrossSigningSettingsFragment.kt index 0c2f8cdee6..84be3ade8a 100644 --- a/vector/src/main/java/im/vector/riotx/features/settings/crosssigning/CrossSigningSettingsFragment.kt +++ b/vector/src/main/java/im/vector/riotx/features/settings/crosssigning/CrossSigningSettingsFragment.kt @@ -120,6 +120,12 @@ class CrossSigningSettingsFragment @Inject constructor( } override fun onResetCrossSigningKeys() { - viewModel.handle(CrossSigningAction.InitializeCrossSigning()) + AlertDialog.Builder(requireContext()) + .setTitle(R.string.dialog_title_confirmation) + .setMessage(R.string.are_you_sure) + .setPositiveButton(R.string.ok) { _, _ -> + viewModel.handle(CrossSigningAction.InitializeCrossSigning()) + } + .show() } }