1
0
Fork 0
mirror of https://github.com/anyproto/anytype-ts.git synced 2025-06-08 05:57:02 +09:00

JS-4473: fix

This commit is contained in:
Andrew Simachev 2024-05-02 15:40:17 +02:00
parent c524b27f24
commit ebff3f9be6
No known key found for this signature in database
GPG key ID: 49A163D0D14E6FD8

View file

@ -115,12 +115,18 @@ function createWindow () {
e.preventDefault();
let onClose = () => {
is.macos ? mainWindow.hide() : Api.exit(mainWindow, '', false);
const { config } = ConfigManager;
if (!is.macos && config.hideTray) {
Api.exit(mainWindow, '', false);
} else {
mainWindow.hide();
};
};
if (mainWindow.isFullScreen()) {
mainWindow.setFullScreen(false);
mainWindow.once('leave-full-screen', onClose);
mainWindow.once('leave-full-screen', () => onClose());
} else {
onClose();
};