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 {
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,