Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

mobile: fix backup not created before migration

ammarahm-edfd62b1b63172
diff --git a/apps/mobile/app/components/sheets/migrate/index.tsx b/apps/mobile/app/components/sheets/migrate/index.tsx
index bcb584d98..f24c8d724 100644
--- a/apps/mobile/app/components/sheets/migrate/index.tsx
+++ b/apps/mobile/app/components/sheets/migrate/index.tsx
@@ -92,16 +92,16 @@ export default function Migrate() {
try {
setLoading(true);
await sleep(1000);
- // const backupSaved = await BackupService.run(false, "local");
- // if (!backupSaved) {
- // ToastEvent.show({
- // heading: "Migration failed",
- // message: "You must download a backup of your data before migrating.",
- // context: "local"
- // });
- // setLoading(false);
- // return;
- // }
+ const backupSaved = await BackupService.run(false, "local");
+ if (!backupSaved) {
+ ToastEvent.show({
+ heading: "Migration failed",
+ message: "You must download a backup of your data before migrating.",
+ context: "local"
+ });
+ setLoading(false);
+ return;
+ }
await db.migrations?.migrate();
eSendEvent(eCloseSheet);
await sleep(500);