diff options
author | Amine <amine@mouafik.fr> | 2020-02-28 02:39:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-28 02:39:40 +0100 |
commit | 4c084fd3b336dff2ca1d2c326b1e8e98af2b7e29 (patch) | |
tree | f91e6e4f4aa344e4788430691e72fd58fa1f2db6 /src/components | |
parent | Merge pull request #403 from getferdi/feat/#270 (diff) | |
parent | Fix lock at startup when previously closed while locked (diff) | |
download | ferdium-app-4c084fd3b336dff2ca1d2c326b1e8e98af2b7e29.tar.gz ferdium-app-4c084fd3b336dff2ca1d2c326b1e8e98af2b7e29.tar.zst ferdium-app-4c084fd3b336dff2ca1d2c326b1e8e98af2b7e29.zip |
Merge pull request #393 from getferdi/refactor/lock
Fix race condition in Ferdi Lock at startup
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/layout/Sidebar.js | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/components/layout/Sidebar.js b/src/components/layout/Sidebar.js index 48a83c5a1..bd10ccb4a 100644 --- a/src/components/layout/Sidebar.js +++ b/src/components/layout/Sidebar.js | |||
@@ -118,21 +118,12 @@ export default @inject('stores', 'actions') @observer class Sidebar extends Comp | |||
118 | type="button" | 118 | type="button" |
119 | className="sidebar__button" | 119 | className="sidebar__button" |
120 | onClick={() => { | 120 | onClick={() => { |
121 | // Disable lock first - otherwise the application might not update correctly | ||
122 | actions.settings.update({ | 121 | actions.settings.update({ |
123 | type: 'app', | 122 | type: 'app', |
124 | data: { | 123 | data: { |
125 | locked: false, | 124 | locked: true, |
126 | }, | 125 | }, |
127 | }); | 126 | }); |
128 | setTimeout(() => { | ||
129 | actions.settings.update({ | ||
130 | type: 'app', | ||
131 | data: { | ||
132 | locked: true, | ||
133 | }, | ||
134 | }); | ||
135 | }, 0); | ||
136 | }} | 127 | }} |
137 | data-tip={`${intl.formatMessage(messages.lockFerdi)} (${ctrlKey}+Shift+L)`} | 128 | data-tip={`${intl.formatMessage(messages.lockFerdi)} (${ctrlKey}+Shift+L)`} |
138 | > | 129 | > |