aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/Menu.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Menu.js')
-rw-r--r--src/lib/Menu.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/Menu.js b/src/lib/Menu.js
index 41b4aa9f7..b8826f12e 100644
--- a/src/lib/Menu.js
+++ b/src/lib/Menu.js
@@ -7,7 +7,7 @@ import {
7 systemPreferences, 7 systemPreferences,
8 getCurrentWindow, 8 getCurrentWindow,
9} from '@electron/remote'; 9} from '@electron/remote';
10import { autorun, makeObservable, observable } from 'mobx'; 10import { autorun, action, makeObservable, observable } from 'mobx';
11import { defineMessages } from 'react-intl'; 11import { defineMessages } from 'react-intl';
12import osName from 'os-name'; 12import osName from 'os-name';
13import { fromJS } from 'immutable'; 13import { fromJS } from 'immutable';
@@ -635,6 +635,10 @@ class FranzMenu {
635 }, 10); 635 }, 10);
636 } 636 }
637 637
638 @action _setCurrentTemplate(tpl) {
639 this.currentTemplate = tpl;
640 }
641
638 rebuild() { 642 rebuild() {
639 this._build(); 643 this._build();
640 } 644 }
@@ -989,7 +993,7 @@ class FranzMenu {
989 ...this.debugMenu(), 993 ...this.debugMenu(),
990 ); 994 );
991 } 995 }
992 this.currentTemplate = tpl; 996 this._setCurrentTemplate(tpl);
993 const menu = Menu.buildFromTemplate(tpl); 997 const menu = Menu.buildFromTemplate(tpl);
994 Menu.setApplicationMenu(menu); 998 Menu.setApplicationMenu(menu);
995 } 999 }