feat: better backup errors (#2290)

Instead of creating error reports show the error to user
use BackupVersion.unknown
This commit is contained in:
cyan
2025-05-26 11:38:36 +03:00
committed by GitHub
parent d342173239
commit e03dcc7fe9
3 changed files with 18 additions and 8 deletions
@@ -173,8 +173,19 @@ class RestoreFromBackupPage extends BasePage {
return;
}
await restoreFromBackupViewModel.import(textEditingController.text);
try {
await restoreFromBackupViewModel.import(textEditingController.text);
} catch (e) {
await showPopUp<void>(
context: context,
builder: (_) {
return AlertWithOneAction(
alertTitle: S.current.error,
alertContent: e.toString(),
buttonText: S.of(context).ok,
buttonAction: () => Navigator.of(context).pop());
});
}
textEditingController.text = '';
}
}