diff options
Diffstat (limited to 'src/stores/SettingsStore.js')
-rw-r--r-- | src/stores/SettingsStore.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/stores/SettingsStore.js b/src/stores/SettingsStore.js index df0fc77e9..051e86be2 100644 --- a/src/stores/SettingsStore.js +++ b/src/stores/SettingsStore.js | |||
@@ -68,7 +68,6 @@ export default class SettingsStore extends Store { | |||
68 | () => this.all.app.locked, | 68 | () => this.all.app.locked, |
69 | () => { | 69 | () => { |
70 | const { router } = window.ferdi.stores; | 70 | const { router } = window.ferdi.stores; |
71 | |||
72 | if (this.all.app.locked && this.all.app.lockingFeatureEnabled) { | 71 | if (this.all.app.locked && this.all.app.lockingFeatureEnabled) { |
73 | // App just got locked, redirect to unlock screen | 72 | // App just got locked, redirect to unlock screen |
74 | router.push('/auth/locked'); | 73 | router.push('/auth/locked'); |
@@ -82,7 +81,8 @@ export default class SettingsStore extends Store { | |||
82 | 81 | ||
83 | // Make sure to lock app on launch if locking feature is enabled | 82 | // Make sure to lock app on launch if locking feature is enabled |
84 | setTimeout(() => { | 83 | setTimeout(() => { |
85 | if (this.all.app.lockingFeatureEnabled) { | 84 | const isLoggedIn = Boolean(localStorage.getItem('authToken')); |
85 | if (isLoggedIn && this.all.app.lockingFeatureEnabled) { | ||
86 | // Disable lock first - otherwise the lock might not get activated corrently | 86 | // Disable lock first - otherwise the lock might not get activated corrently |
87 | this.actions.settings.update({ | 87 | this.actions.settings.update({ |
88 | type: 'app', | 88 | type: 'app', |