mirror of
https://github.com/MasterAcnolo/Freedom-Loader.git
synced 2026-09-27 20:11:15 +02:00
fix: missing config reference in main.js and tray.js
This commit is contained in:
committed by
MasterAcnolo
parent
225ccf4d2d
commit
dc7239379d
@@ -18,9 +18,10 @@ let tray = null;
|
|||||||
* - Handle left-click behavior (toggle window visibility).
|
* - Handle left-click behavior (toggle window visibility).
|
||||||
*
|
*
|
||||||
* @param {import('electron').BrowserWindow} mainWindow - The main application window.
|
* @param {import('electron').BrowserWindow} mainWindow - The main application window.
|
||||||
|
* @param devMode - is application packaged
|
||||||
* @returns {Tray} The created Tray instance.
|
* @returns {Tray} The created Tray instance.
|
||||||
*/
|
*/
|
||||||
function createSystemTray(mainWindow) {
|
function createSystemTray(mainWindow, devMode) {
|
||||||
// Prevent creating multiple instances
|
// Prevent creating multiple instances
|
||||||
if (tray) return tray;
|
if (tray) return tray;
|
||||||
|
|
||||||
@@ -29,7 +30,7 @@ function createSystemTray(mainWindow) {
|
|||||||
* Tip: Use a .png for Linux/macOS and a .ico for Windows for best results.
|
* Tip: Use a .png for Linux/macOS and a .ico for Windows for best results.
|
||||||
* Here we use a generic PNG assuming it exists in your resources folder.
|
* Here we use a generic PNG assuming it exists in your resources folder.
|
||||||
*/
|
*/
|
||||||
const iconPath = config.devMode ?
|
const iconPath = devMode ?
|
||||||
path.join(__dirname, "..", "build", "app-icon-64x64.png") :
|
path.join(__dirname, "..", "build", "app-icon-64x64.png") :
|
||||||
path.join(process.resourcesPath, "build", "app-icon-64x64.png");
|
path.join(process.resourcesPath, "build", "app-icon-64x64.png");
|
||||||
|
|
||||||
|
|||||||
2
main.js
2
main.js
@@ -131,7 +131,7 @@ app.whenReady().then(async () => {
|
|||||||
getMainWindow().show();
|
getMainWindow().show();
|
||||||
|
|
||||||
if (configFeatures.systemTray) {
|
if (configFeatures.systemTray) {
|
||||||
createSystemTray(getMainWindow());
|
createSystemTray(getMainWindow(), config.devMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (configFeatures.discordRPC) startRPC();
|
if (configFeatures.discordRPC) startRPC();
|
||||||
|
|||||||
Reference in New Issue
Block a user