diff options
author | 2019-10-02 11:51:48 +0200 | |
---|---|---|
committer | 2019-10-02 11:51:48 +0200 | |
commit | 2ae62093d346542fb5c946a066f918c6582a3f31 (patch) | |
tree | 283e734795bb6454275f7bf5441419ac358b02b1 | |
parent | Fix webview logger throwing errors (diff) | |
download | ferdium-app-2ae62093d346542fb5c946a066f918c6582a3f31.tar.gz ferdium-app-2ae62093d346542fb5c946a066f918c6582a3f31.tar.zst ferdium-app-2ae62093d346542fb5c946a066f918c6582a3f31.zip |
Fix Ferdi Lock not corrently locking
-rw-r--r-- | src/components/layout/Sidebar.js | 11 | ||||
-rw-r--r-- | src/lib/Menu.js | 11 |
2 files changed, 20 insertions, 2 deletions
diff --git a/src/components/layout/Sidebar.js b/src/components/layout/Sidebar.js index 1d6bfee33..d0cae3443 100644 --- a/src/components/layout/Sidebar.js +++ b/src/components/layout/Sidebar.js | |||
@@ -118,12 +118,21 @@ export default @inject('stores', 'actions') @observer class Sidebar extends Comp | |||
118 | type="button" | 118 | type="button" |
119 | className={`sidebar__button sidebar__button--audio ${isAppMuted ? 'is-muted' : ''}`} | 119 | className={`sidebar__button sidebar__button--audio ${isAppMuted ? 'is-muted' : ''}`} |
120 | onClick={() => { | 120 | onClick={() => { |
121 | // Disable lock first - otherwise the application might not update correctly | ||
121 | actions.settings.update({ | 122 | actions.settings.update({ |
122 | type: 'app', | 123 | type: 'app', |
123 | data: { | 124 | data: { |
124 | locked: true, | 125 | locked: false, |
125 | }, | 126 | }, |
126 | }); | 127 | }); |
128 | setTimeout(() => { | ||
129 | actions.settings.update({ | ||
130 | type: 'app', | ||
131 | data: { | ||
132 | locked: true, | ||
133 | }, | ||
134 | }); | ||
135 | }, 0); | ||
127 | }} | 136 | }} |
128 | data-tip={`${intl.formatMessage(messages.lockFerdi)} (${ctrlKey}+Shift+L)`} | 137 | data-tip={`${intl.formatMessage(messages.lockFerdi)} (${ctrlKey}+Shift+L)`} |
129 | > | 138 | > |
diff --git a/src/lib/Menu.js b/src/lib/Menu.js index 183ae6472..beaafb4d1 100644 --- a/src/lib/Menu.js +++ b/src/lib/Menu.js | |||
@@ -783,12 +783,21 @@ export default class FranzMenu { | |||
783 | accelerator: 'CmdOrCtrl+Shift+L', | 783 | accelerator: 'CmdOrCtrl+Shift+L', |
784 | enabled: this.stores.settings.app.lockingFeatureEnabled, | 784 | enabled: this.stores.settings.app.lockingFeatureEnabled, |
785 | click() { | 785 | click() { |
786 | // Disable lock first - otherwise the application might not update correctly | ||
786 | actions.settings.update({ | 787 | actions.settings.update({ |
787 | type: 'app', | 788 | type: 'app', |
788 | data: { | 789 | data: { |
789 | locked: true, | 790 | locked: false, |
790 | }, | 791 | }, |
791 | }); | 792 | }); |
793 | setTimeout(() => { | ||
794 | actions.settings.update({ | ||
795 | type: 'app', | ||
796 | data: { | ||
797 | locked: true, | ||
798 | }, | ||
799 | }); | ||
800 | }, 0); | ||
792 | }, | 801 | }, |
793 | }); | 802 | }); |
794 | 803 | ||