From 38fed25e30a90be9944872b1f90998de7ab3b78e Mon Sep 17 00:00:00 2001 From: Abdullah Atta Date: Wed, 26 Oct 2022 10:55:10 +0500 Subject: [PATCH] desktop: quit the application when all windows are closed Our app was rejected by App Store review because: "The user interface of your app is not consistent with the macOS Human Interface Guidelines. Specifically, we found that when the user closes the main application window there is no menu item to re-open it." A suggested option for a single-window app is to "save data and quit the app when the main window is closed," and that's what we are doing. --- apps/web/desktop/electron.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/desktop/electron.js b/apps/web/desktop/electron.js index e2afbbe11..020b04e9b 100644 --- a/apps/web/desktop/electron.js +++ b/apps/web/desktop/electron.js @@ -118,7 +118,7 @@ app.on("ready", async () => { }); app.on("window-all-closed", () => { - if (process.platform !== "darwin") { + if (process.platform !== "darwin" || MAC_APP_STORE) { app.quit(); } });