refactor: systemTray window logic. Window reference is now dynamic and guarded against destroyed states. Minimize can now put window in the systemTray if option is active

This commit is contained in:
MasterAcnolo
2026-09-10 10:27:11 +02:00
parent e4243a01ae
commit 311bff6df5
4 changed files with 29 additions and 12 deletions

View File

@@ -87,7 +87,8 @@ async function createMainWindow() {
* cancels the destruction and hides the window instead.
*/
mainWindow.on('close', (event) => {
if (!app.isQuitting && config.systemTray ) {
if (!app.isQuitting && config.configFeatures.systemTray) {
event.preventDefault();
mainWindow.hide();
return false;