Honor reload abort in backup restore

This commit is contained in:
Alexander
2026-08-28 16:09:51 +02:00
parent f2b6ac3a49
commit edd5deaf5a
2 changed files with 5 additions and 3 deletions
+2 -1
View File
@@ -943,7 +943,8 @@ function App() {
if (!result.ok) throw new Error(result.error || 'Restore failed');
if (Storage.mode === 'api') {
// The legacy backup route restored the default project — refresh everything.
await reloadProjects({ seedExpanded: false });
// Null = flush failed ('Save failed' toast shown there); keep dirty state, skip success toast.
if (!(await reloadProjects({ seedExpanded: false }))) return;
await SyncPoller.syncChecksums();
} else {
const [raw, backups, sizeInfo] = await Promise.all([Storage.load(), Storage.listBackups(), Storage.getHealthInfo()]);
+3 -2
View File
@@ -8609,9 +8609,10 @@ function App() {
if (!result.ok) throw new Error(result.error || 'Restore failed');
if (Storage.mode === 'api') {
// The legacy backup route restored the default project — refresh everything.
await reloadProjects({
// Null = flush failed ('Save failed' toast shown there); keep dirty state, skip success toast.
if (!(await reloadProjects({
seedExpanded: false
});
}))) return;
await SyncPoller.syncChecksums();
} else {
const [raw, backups, sizeInfo] = await Promise.all([Storage.load(), Storage.listBackups(), Storage.getHealthInfo()]);