Merge pull request #2778 from krille-chan/krille/logout-on-dismiss-dialog

fix: Getting logged out on dialog dismissed
This commit is contained in:
Krille-chan 2026-03-28 16:52:03 +01:00 committed by GitHub
commit 1b0c4d3f0b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -65,18 +65,16 @@ class SettingsController extends State<Settings> {
Future<void> logoutAction() async { Future<void> logoutAction() async {
final l10n = L10n.of(context); final l10n = L10n.of(context);
final matrix = Matrix.of(context); final matrix = Matrix.of(context);
if (await showOkCancelAlertDialog( final consent = await showOkCancelAlertDialog(
useRootNavigator: false, useRootNavigator: false,
context: context, context: context,
title: l10n.areYouSureYouWantToLogout, title: l10n.areYouSureYouWantToLogout,
message: l10n.noBackupWarning, message: l10n.noBackupWarning,
isDestructive: cryptoIdentityConnected == false, isDestructive: cryptoIdentityConnected == false,
okLabel: l10n.logout, okLabel: l10n.logout,
cancelLabel: l10n.cancel, cancelLabel: l10n.cancel,
) == );
OkCancelResult.cancel) { if (consent != OkCancelResult.ok) return;
return;
}
if (!mounted) return; if (!mounted) return;
await showFutureLoadingDialog( await showFutureLoadingDialog(
context: context, context: context,