From dbf0894b53df1be5bf45d1713ec03902cfc63ac3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Sat, 28 Mar 2026 15:06:38 +0100 Subject: [PATCH] fix: Getting logged out on dialog dismissed closes https://github.com/krille-chan/fluffychat/issues/2777 --- lib/pages/settings/settings.dart | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) 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,