Skip to content

Commit

Permalink
test: moving createBackupFromPrevDB to the main context
Browse files Browse the repository at this point in the history
  • Loading branch information
OKendigelyan committed Dec 19, 2024
1 parent 52465f6 commit 17928da
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions apps/desktop/public/electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,14 @@ async function createBackupFromPrevDB() {
let mainWindow;
let deeplinkURL;

// Execute createBackupFromPrevDB at the beginning
try {

createBackupFromPrevDB();
} catch (error) {
log.error("Error has occured while migrating the app", error);
}

// Create the native browser window.
function createWindow() {
mainWindow = new BrowserWindow({
Expand Down Expand Up @@ -345,12 +353,7 @@ function start() {
// is ready to create the browser windows.
// Some APIs can only be used after this event occurs.
app.whenReady().then(async () => {
// Execute createBackupFromPrevDB at the beginning
try {
await createBackupFromPrevDB();
} catch (error) {
log.error("Error has occured while migrating the app", error);
}


createWindow();
});
Expand Down

0 comments on commit 17928da

Please sign in to comment.