From acdbc229533a4f5f57b83b882ce48037a8a17299 Mon Sep 17 00:00:00 2001 From: Matt Gibson Date: Fri, 18 Dec 2020 09:20:59 -0600 Subject: [PATCH] Force update of tray menu if on linux (#233) --- src/electron/tray.main.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/electron/tray.main.ts b/src/electron/tray.main.ts index e34c54b7da..46b8abc94c 100644 --- a/src/electron/tray.main.ts +++ b/src/electron/tray.main.ts @@ -132,6 +132,12 @@ export class TrayMain { } } + updateContextMenu() { + if (this.contextMenu != null && this.isLinux()) { + this.tray.setContextMenu(this.contextMenu); + } + } + private hideDock() { app.dock.hide(); } @@ -144,6 +150,10 @@ export class TrayMain { return process.platform === 'darwin'; } + private isLinux() { + return process.platform === 'linux'; + } + private async toggleWindow() { if (this.windowMain.win == null) { if (this.isDarwin()) {