fix(patch): update start hidden in tray

This commit is contained in:
josselinonduty 2025-01-19 23:11:45 +01:00
parent b4699a0df3
commit 719197ccbc
No known key found for this signature in database
2 changed files with 25 additions and 10 deletions

View File

@ -38,7 +38,7 @@ prepare: clean install_build_deps
@echo "Remove kernel version from User-Agent (https://github.com/aunetx/deezer-linux/pull/9)"
@echo "Avoid to set the text/html mime type (https://github.com/aunetx/deezer-linux/issues/13)"
@echo "Add a better management of MPRIS (https://github.com/aunetx/deezer-linux/pull/61)"
# $(foreach p, $(wildcard ./patches/*), patch -p1 -dapp < $(p);)
$(foreach p, $(wildcard ./patches/*), patch -p1 -dapp < $(p);)
@echo "Append `package-append.json` to the `package.json` of the app"
@echo "Adds electron, elecron-builder dependencies, prod and build directives"

View File

@ -1,19 +1,34 @@
From 9c19490f706350a2ca8cceae7a998916d21de89b Mon Sep 17 00:00:00 2001
From: josselinonduty <contact@josselinonduty.fr>
Date: Sun, 19 Jan 2025 22:59:38 +0100
Subject: [PATCH] fix: reduce to systray on close
---
build/main.js | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/build/main.js b/build/main.js
index 5066eef..592a6bc 100644
index c15e2c3..b883a28 100644
--- a/build/main.js
+++ b/build/main.js
@@ -3122,8 +3122,12 @@
@@ -3085,10 +3085,13 @@
finalMinSize[1]
);
}
- isDev() ? this.window.showInactive() : this.window.show(),
- isDev(external_electron_namespaceObject.app)
- ? this.window.showInactive()
- : this.window.show(),
- this.thumbar.init();
+ if (!process.argv.some(arg => arg === '--start-in-tray')) {
+ isDev() ? this.window.showInactive() : this.window.show(),
+ this.thumbar.init();
+ } else {
+ if (!process.argv.some(arg => arg === '--start-in-tray'))
+ isDev(external_electron_namespaceObject.app)
+ ? this.window.showInactive()
+ : this.window.show(),
+ this.thumbar.init();
+ else
+ this.window.hide();
+ }
}),
this.appService.enableDevMode();
}
}
--
2.43.0