mirror of
https://github.com/zadam/trilium.git
synced 2025-12-20 15:19:56 +01:00
ignore toggle tray command if tray is disabled
This commit is contained in:
@@ -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());
|
||||||
|
|||||||
Reference in New Issue
Block a user