mirror of
https://github.com/MasterAcnolo/Freedom-Loader.git
synced 2026-09-28 04:21:15 +02:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user