Skip to content

Commit 9715cff

Browse files
authored
fix: move setapp framework initialize to outside app.activate handler (#220)
1 parent 1f96967 commit 9715cff

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/main/main.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -473,11 +473,14 @@ app.on("window-all-closed", () => {
473473
app
474474
.whenReady()
475475
.then(() => {
476+
if (process.env.IS_SETAPP_BUILD === "true") {
477+
log.log("[SETAPP] build identified")
478+
const setappFramework = require("@setapp/framework-wrapper");
479+
setappFramework.SetappManager.shared.reportUsageEvent(setappFramework.SETAPP_USAGE_EVENT.USER_INTERACTION);
480+
log.log("[SETAPP] integration complete")
481+
}
482+
476483
app.on("activate", () => {
477-
if (process.env.IS_SETAPP_BUILD === "true") {
478-
const setappFramework = require("@setapp/framework-wrapper");
479-
setappFramework.SetappManager.shared.reportUsageEvent(setappFramework.SETAPP_USAGE_EVENT.USER_INTERACTION);
480-
}
481484

482485
// On macOS it's common to re-create a window in the app when the
483486
// dock icon is clicked and there are no other windows open.

0 commit comments

Comments
 (0)