diff options
author | 2020-02-28 03:29:23 +0100 | |
---|---|---|
committer | 2020-02-28 03:29:23 +0100 | |
commit | d98d728612c3db75ddf15cc24e93e121a7a91fb1 (patch) | |
tree | f054f8decec93f702453072c13ee1d99b8799fd7 /src/lib | |
parent | Do not include debug menu items when locked (diff) | |
parent | Merge pull request #393 from getferdi/refactor/lock (diff) | |
download | ferdium-app-d98d728612c3db75ddf15cc24e93e121a7a91fb1.tar.gz ferdium-app-d98d728612c3db75ddf15cc24e93e121a7a91fb1.tar.zst ferdium-app-d98d728612c3db75ddf15cc24e93e121a7a91fb1.zip |
Merge branch 'develop' into fix/lock-menu
# Conflicts:
# src/lib/Menu.js
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/Menu.js | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/src/lib/Menu.js b/src/lib/Menu.js index 56276ce2d..2ac7e4465 100644 --- a/src/lib/Menu.js +++ b/src/lib/Menu.js | |||
@@ -1,15 +1,15 @@ | |||
1 | import { remote, shell, clipboard } from 'electron'; | 1 | import { clipboard, remote, shell } from 'electron'; |
2 | import { observable, autorun } from 'mobx'; | 2 | import { autorun, observable } from 'mobx'; |
3 | import { defineMessages } from 'react-intl'; | 3 | import { defineMessages } from 'react-intl'; |
4 | 4 | import { cmdKey, ctrlKey, isMac } from '../environment'; | |
5 | import { isMac, ctrlKey, cmdKey } from '../environment'; | ||
6 | import { workspaceStore } from '../features/workspaces/index'; | ||
7 | import { workspaceActions } from '../features/workspaces/actions'; | ||
8 | import { announcementActions } from '../features/announcements/actions'; | ||
9 | import { announcementsStore } from '../features/announcements'; | 5 | import { announcementsStore } from '../features/announcements'; |
6 | import { announcementActions } from '../features/announcements/actions'; | ||
10 | import { todosStore } from '../features/todos'; | 7 | import { todosStore } from '../features/todos'; |
11 | import { todoActions } from '../features/todos/actions'; | 8 | import { todoActions } from '../features/todos/actions'; |
12 | import { CUSTOM_WEBSITE_ID } from '../features/webControls/constants'; | 9 | import { CUSTOM_WEBSITE_ID } from '../features/webControls/constants'; |
10 | import { workspaceActions } from '../features/workspaces/actions'; | ||
11 | import { workspaceStore } from '../features/workspaces/index'; | ||
12 | |||
13 | 13 | ||
14 | const { app, Menu, dialog } = remote; | 14 | const { app, Menu, dialog } = remote; |
15 | 15 | ||
@@ -811,22 +811,13 @@ export default class FranzMenu { | |||
811 | accelerator: 'CmdOrCtrl+Shift+L', | 811 | accelerator: 'CmdOrCtrl+Shift+L', |
812 | enabled: this.stores.user.isLoggedIn && this.stores.settings.app.lockingFeatureEnabled, | 812 | enabled: this.stores.user.isLoggedIn && this.stores.settings.app.lockingFeatureEnabled, |
813 | click() { | 813 | click() { |
814 | // Disable lock first - otherwise the application might not update correctly | ||
815 | actions.settings.update({ | 814 | actions.settings.update({ |
816 | type: 'app', | 815 | type: 'app', |
817 | data: { | 816 | data: { |
818 | locked: false, | 817 | locked: true, |
819 | }, | 818 | }, |
820 | }); | 819 | }); |
821 | setTimeout(() => { | 820 | } |
822 | actions.settings.update({ | ||
823 | type: 'app', | ||
824 | data: { | ||
825 | locked: true, | ||
826 | }, | ||
827 | }); | ||
828 | }, 0); | ||
829 | }, | ||
830 | }); | 821 | }); |
831 | 822 | ||
832 | if (serviceTpl.length > 0) { | 823 | if (serviceTpl.length > 0) { |