minor fixes [skip ci]

This commit is contained in:
Omar
2026-06-23 17:39:57 +02:00
parent 2764b46bfe
commit cda9d09ead
2 changed files with 7 additions and 3 deletions
+6 -2
View File
@@ -154,8 +154,12 @@ class BackupPage extends BasePage {
leftButtonText: S.of(context).share,
actionRightButton: () async {
await backupViewModelBase.saveToDownload(backup.name, backup.file);
Navigator.of(dialogContext).pop();
await showBar<void>(context, S.of(context).file_saved);
if (dialogContext.mounted && Navigator.canPop(dialogContext)) {
Navigator.of(dialogContext).pop();
}
if (context.mounted && Navigator.canPop(context)) {
await showBar<void>(context, S.of(context).file_saved);
}
},
actionLeftButton: () async {
Navigator.of(dialogContext).pop();
@@ -161,7 +161,7 @@ abstract class LedgerViewModelBase extends HardwareWalletViewModel with Store {
allowChangeWallet: true,
isReconnect: true,
onConnectDevice: (context, ledgerVM) async {
if (context.mounted) {
if (context.mounted && Navigator.of(context).canPop()) {
Navigator.of(context).pop();
}
},