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.
This commit is contained in:
Abdullah Atta
2022-10-26 10:55:10 +05:00
parent 082b9755db
commit 38fed25e30

View File

@@ -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();
}
});