diff options
author | 2021-09-05 01:29:23 +0200 | |
---|---|---|
committer | 2021-09-05 04:59:23 +0530 | |
commit | eda54bbf7707d42ef0c9ebcf71d31bd1003da159 (patch) | |
tree | a456a58547e32628d1e1e4208958db79e88b717c | |
parent | docs: improve contribution documentation (#1865) [skip ci] (diff) | |
download | ferdium-app-eda54bbf7707d42ef0c9ebcf71d31bd1003da159.tar.gz ferdium-app-eda54bbf7707d42ef0c9ebcf71d31bd1003da159.tar.zst ferdium-app-eda54bbf7707d42ef0c9ebcf71d31bd1003da159.zip |
fix: ferdi locking with lock feature disabled (#1866)
Set run the inactivity timeout only if lock feature is enabled, and use same condition between lock
screen and locked menu
fix #1862
-rw-r--r-- | src/routes.js | 4 | ||||
-rw-r--r-- | src/stores/SettingsStore.js | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/routes.js b/src/routes.js index 5af0c4db9..4d32a59e0 100644 --- a/src/routes.js +++ b/src/routes.js | |||
@@ -35,11 +35,11 @@ export default | |||
35 | @observer | 35 | @observer |
36 | class Routes extends Component { | 36 | class Routes extends Component { |
37 | render() { | 37 | render() { |
38 | const { locked, lockingFeatureEnabled } = this.props.stores.settings.app; | 38 | const { locked } = this.props.stores.settings.app; |
39 | 39 | ||
40 | const { history } = this.props; | 40 | const { history } = this.props; |
41 | 41 | ||
42 | if (lockingFeatureEnabled && locked) { | 42 | if (locked) { |
43 | return <LockedScreen />; | 43 | return <LockedScreen />; |
44 | } | 44 | } |
45 | 45 | ||
diff --git a/src/stores/SettingsStore.js b/src/stores/SettingsStore.js index f551e1e49..9aade974c 100644 --- a/src/stores/SettingsStore.js +++ b/src/stores/SettingsStore.js | |||
@@ -65,7 +65,7 @@ export default class SettingsStore extends Store { | |||
65 | // Inactivity lock timer | 65 | // Inactivity lock timer |
66 | let inactivityTimer; | 66 | let inactivityTimer; |
67 | getCurrentWindow().on('blur', () => { | 67 | getCurrentWindow().on('blur', () => { |
68 | if (this.all.app.inactivityLock !== 0) { | 68 | if (this.all.app.lockingFeatureEnabled && this.all.app.inactivityLock !== 0) { |
69 | inactivityTimer = setTimeout(() => { | 69 | inactivityTimer = setTimeout(() => { |
70 | this.actions.settings.update({ | 70 | this.actions.settings.update({ |
71 | type: 'app', | 71 | type: 'app', |