mirror of
https://github.com/zadam/trilium.git
synced 2025-11-10 16:39:02 +01:00
ignore toggle tray command if tray is disabled (#7654)
This commit is contained in:
commit
4c8f20be9a
@ -171,7 +171,8 @@ export default class RootCommandExecutor extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
toggleTrayCommand() {
|
toggleTrayCommand() {
|
||||||
if (!utils.isElectron()) return;
|
if (!utils.isElectron() || options.is("disableTray")) return;
|
||||||
|
|
||||||
const { BrowserWindow } = utils.dynamicRequire("@electron/remote");
|
const { BrowserWindow } = utils.dynamicRequire("@electron/remote");
|
||||||
const windows = BrowserWindow.getAllWindows() as Electron.BaseWindow[];
|
const windows = BrowserWindow.getAllWindows() as Electron.BaseWindow[];
|
||||||
const isVisible = windows.every((w) => w.isVisible());
|
const isVisible = windows.every((w) => w.isVisible());
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user