From 3b17ace46b170b64068485c6797985c0261551ea Mon Sep 17 00:00:00 2001 From: Will Chen Date: Mon, 21 Apr 2025 17:17:19 -0700 Subject: [PATCH] Actually call the move to downloads folder function --- src/main.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main.ts b/src/main.ts index eee0129..eb08dca 100644 --- a/src/main.ts +++ b/src/main.ts @@ -12,6 +12,8 @@ log.errorHandler.startCatching(); log.eventLogger.startLogging(); log.scope.labelPadding = false; +const logger = log.scope("main"); + updateElectronApp(); // additional configuration options available // Load environment variables from .env file @@ -25,6 +27,12 @@ if (started) { app.quit(); } +export async function onReady() { + await onFirstRunMaybe(); +} + +app.whenReady().then(onReady); + /** * Is this the first run of Fiddle? If so, perform * tasks that we only want to do in this case. @@ -46,6 +54,7 @@ export async function onFirstRunMaybe() { async function promptMoveToApplicationsFolder(): Promise { if (process.platform !== "darwin") return; if (app.isInApplicationsFolder()) return; + logger.log("Prompting user to move to applications folder"); const { response } = await dialog.showMessageBox({ type: "question", @@ -55,7 +64,10 @@ async function promptMoveToApplicationsFolder(): Promise { }); if (response === 0) { + logger.log("User chose to move to applications folder"); app.moveToApplicationsFolder(); + } else { + logger.log("User chose not to move to applications folder"); } }