mirror of
https://github.com/zadam/trilium.git
synced 2025-11-10 08:29:00 +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() {
|
||||
if (!utils.isElectron()) return;
|
||||
if (!utils.isElectron() || options.is("disableTray")) return;
|
||||
|
||||
const { BrowserWindow } = utils.dynamicRequire("@electron/remote");
|
||||
const windows = BrowserWindow.getAllWindows() as Electron.BaseWindow[];
|
||||
const isVisible = windows.every((w) => w.isVisible());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user