Skip to content

Commit

Permalink
Fixing flatpak problems
Browse files Browse the repository at this point in the history
  • Loading branch information
aandrew-me committed Dec 24, 2022
1 parent 1556495 commit a781553
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,25 +128,21 @@ app.whenReady().then(() => {
let trayInUse = false;
let icon;
if (process.platform == "win32") {
icon = __dirname + "/resources/icon.ico";
icon = path.join(__dirname,"resources/icon.ico")
} else if (process.platform == "darwin") {
icon = __dirname + "/resources/icons/16x16.png";
icon = path.join(__dirname, "resources/icons/16x16.png")
} else {
icon = __dirname + "/resources/icon.png";
icon = path.join(__dirname, "resources/icons/256x256.png")
}
ipcMain.on("useTray", (_, enabled) => {
if (enabled && !trayInUse) {
console.log("Using tray");
trayEnabled = true;
trayInUse = true;
tray = new Tray(icon);
tray.setToolTip("ytDownloader");
tray.setContextMenu(contextMenu);
} else if (!enabled) {
trayEnabled = false;
console.log("Disabled tray");
} else {
console.log("Tray already in use");
}
});

Expand Down

0 comments on commit a781553

Please sign in to comment.