mirror of
https://github.com/Mastermindzh/tidal-hifi.git
synced 2024-11-22 13:32:42 +01:00
fix: fixed tray click bug. fixes #196
This commit is contained in:
parent
166ca353cf
commit
af20092053
@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- Replaced "muting artists" with a full implementation of an Adblock mechanism
|
||||
> Disabled audio & visual ads, unlocked lyrics, suggested track, track info, unlimited skips thanks to uBlockOrigin custom filters ([source](https://github.com/uBlockOrigin/uAssets/issues/17495))
|
||||
|
||||
- @thanasistrisp updated Electron to 24.1.2 and fixed the tray bug :)
|
||||
|
||||
## 4.4.0
|
||||
|
||||
- Updated shortcut hint on the menubar to reflect the new `ctrl+=` shortcut.
|
||||
|
@ -1,8 +1,7 @@
|
||||
appId: com.rickvanlieshout.tidal-hifi
|
||||
electronVersion: 19.0.5
|
||||
electronVersion: 24.1.2
|
||||
electronDownload:
|
||||
version: 19.0.5+wvcus
|
||||
mirror: https://github.com/castlabs/electron-releases/releases/download/v
|
||||
version: 24.1.2+wvcus
|
||||
snap:
|
||||
plugs:
|
||||
- default
|
||||
|
4
package-lock.json
generated
4
package-lock.json
generated
@ -20,7 +20,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@mastermindzh/prettier-config": "^1.0.0",
|
||||
"electron": "git+https://github.com/castlabs/electron-releases.git#v19.0.5+wvcus",
|
||||
"electron": "git+https://github.com/castlabs/electron-releases.git#v24.1.2+wvcus",
|
||||
"electron-builder": "^24.2.1",
|
||||
"js-yaml": "^3.14.1",
|
||||
"markdown-toc": "^1.2.0",
|
||||
@ -10197,7 +10197,7 @@
|
||||
},
|
||||
"electron": {
|
||||
"version": "git+ssh://git@github.com/castlabs/electron-releases.git#b7e63c1416bbebfb25a5eddebd2049d65996ff26",
|
||||
"from": "electron@git+https://github.com/castlabs/electron-releases.git#v19.0.5+wvcus",
|
||||
"from": "electron@git+https://github.com/castlabs/electron-releases.git#v24.1.2+wvcus",
|
||||
"requires": {
|
||||
"@electron/get": "^1.14.1",
|
||||
"@types/node": "^16.11.26",
|
||||
|
@ -42,7 +42,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@mastermindzh/prettier-config": "^1.0.0",
|
||||
"electron": "git+https://github.com/castlabs/electron-releases.git#v19.0.5+wvcus",
|
||||
"electron": "git+https://github.com/castlabs/electron-releases.git#v24.1.2+wvcus",
|
||||
"electron-builder": "^24.2.1",
|
||||
"js-yaml": "^3.14.1",
|
||||
"markdown-toc": "^1.2.0",
|
||||
|
@ -91,6 +91,7 @@ function createWindow(options = {}) {
|
||||
backgroundColor: options.backgroundColor,
|
||||
autoHideMenuBar: true,
|
||||
webPreferences: {
|
||||
sandbox: false,
|
||||
preload: path.join(__dirname, "preload.js"),
|
||||
plugins: true,
|
||||
devTools: true, // I like tinkering, others might too
|
||||
@ -159,7 +160,7 @@ app.on("ready", async () => {
|
||||
if (store.get(settings.adBlock)) {
|
||||
const filter = { urls: ["https://listen.tidal.com/*"] };
|
||||
session.defaultSession.webRequest.onBeforeRequest(filter, (details, callback) => {
|
||||
if (details.url.match(/\d\?country/)) callback({ cancel: true });
|
||||
if (details.url.match(/\/users\/.*\d\?country/)) callback({ cancel: true });
|
||||
else callback({ cancel: false });
|
||||
});
|
||||
}
|
||||
|
@ -13,7 +13,15 @@ trayModule.addTray = function (mainWindow, options = { icon: "" }) {
|
||||
tray.setContextMenu(menu);
|
||||
|
||||
tray.on("click", function () {
|
||||
mainWindow.isVisible() ? mainWindow.focus() : mainWindow.show();
|
||||
if (mainWindow.isVisible()) {
|
||||
if (!mainWindow.isFocused()) {
|
||||
mainWindow.focus();
|
||||
} else {
|
||||
mainWindow.hide();
|
||||
}
|
||||
} else {
|
||||
mainWindow.show();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user