Skip to content

Build your personal knowledge base with Trilium Notes

ignore toggle tray command if tray is disabled

contributor3d70a0534b5b
diff --git a/apps/client/src/components/root_command_executor.ts b/apps/client/src/components/root_command_executor.ts
index 632eb0a887..3ad05b7a2a 100644
--- a/apps/client/src/components/root_command_executor.ts
+++ b/apps/client/src/components/root_command_executor.ts
@@ -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());