diff --git a/lib/pages/settings/settings.dart b/lib/pages/settings/settings.dart index e8b21a54..8829f16f 100644 --- a/lib/pages/settings/settings.dart +++ b/lib/pages/settings/settings.dart @@ -65,18 +65,16 @@ class SettingsController extends State { Future logoutAction() async { final l10n = L10n.of(context); final matrix = Matrix.of(context); - if (await showOkCancelAlertDialog( - useRootNavigator: false, - context: context, - title: l10n.areYouSureYouWantToLogout, - message: l10n.noBackupWarning, - isDestructive: cryptoIdentityConnected == false, - okLabel: l10n.logout, - cancelLabel: l10n.cancel, - ) == - OkCancelResult.cancel) { - return; - } + final consent = await showOkCancelAlertDialog( + useRootNavigator: false, + context: context, + title: l10n.areYouSureYouWantToLogout, + message: l10n.noBackupWarning, + isDestructive: cryptoIdentityConnected == false, + okLabel: l10n.logout, + cancelLabel: l10n.cancel, + ); + if (consent != OkCancelResult.ok) return; if (!mounted) return; await showFutureLoadingDialog( context: context,