From 2ae62093d346542fb5c946a066f918c6582a3f31 Mon Sep 17 00:00:00 2001 From: vantezzen Date: Wed, 2 Oct 2019 11:51:48 +0200 Subject: Fix Ferdi Lock not corrently locking --- src/components/layout/Sidebar.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/components/layout') 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 type="button" className={`sidebar__button sidebar__button--audio ${isAppMuted ? 'is-muted' : ''}`} onClick={() => { + // Disable lock first - otherwise the application might not update correctly actions.settings.update({ type: 'app', data: { - locked: true, + locked: false, }, }); + setTimeout(() => { + actions.settings.update({ + type: 'app', + data: { + locked: true, + }, + }); + }, 0); }} data-tip={`${intl.formatMessage(messages.lockFerdi)} (${ctrlKey}+Shift+L)`} > -- cgit v1.2.3-70-g09d2