diff options
author | 2022-05-14 18:08:26 -0500 | |
---|---|---|
committer | 2022-05-14 23:08:26 +0000 | |
commit | b1abf0ed30983db67cb84928c11a1de4e93181af (patch) | |
tree | 6312763d5652f824a5c6c2bd493514ac868adebb /src/containers/settings | |
parent | Add cross-env debug command for every platform (#148) [skip ci] (diff) | |
download | ferdium-app-b1abf0ed30983db67cb84928c11a1de4e93181af.tar.gz ferdium-app-b1abf0ed30983db67cb84928c11a1de4e93181af.tar.zst ferdium-app-b1abf0ed30983db67cb84928c11a1de4e93181af.zip |
Fix issue where the password got reset if any other setting was changed (#147)
Diffstat (limited to 'src/containers/settings')
-rw-r--r-- | src/containers/settings/EditSettingsScreen.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/containers/settings/EditSettingsScreen.js b/src/containers/settings/EditSettingsScreen.js index 038497f0d..2c1c7f077 100644 --- a/src/containers/settings/EditSettingsScreen.js +++ b/src/containers/settings/EditSettingsScreen.js | |||
@@ -303,8 +303,10 @@ class EditSettingsScreen extends Component { | |||
303 | workspaces: workspaceActions, | 303 | workspaces: workspaceActions, |
304 | } = this.props.actions; | 304 | } = this.props.actions; |
305 | 305 | ||
306 | const useOriginalPassword = settingsData.lockedPassword === ''; | ||
307 | |||
306 | this.setState({ | 308 | this.setState({ |
307 | lockedPassword: settingsData.lockedPassword, | 309 | lockedPassword: useOriginalPassword ? '' : settingsData.lockedPassword, |
308 | }); | 310 | }); |
309 | 311 | ||
310 | app.launchOnStartup({ | 312 | app.launchOnStartup({ |
@@ -339,7 +341,7 @@ class EditSettingsScreen extends Component { | |||
339 | predefinedTodoServer: settingsData.predefinedTodoServer, | 341 | predefinedTodoServer: settingsData.predefinedTodoServer, |
340 | customTodoServer: settingsData.customTodoServer, | 342 | customTodoServer: settingsData.customTodoServer, |
341 | lockingFeatureEnabled: Boolean(settingsData.lockingFeatureEnabled), | 343 | lockingFeatureEnabled: Boolean(settingsData.lockingFeatureEnabled), |
342 | lockedPassword: hash(String(settingsData.lockedPassword)), | 344 | lockedPassword: useOriginalPassword ? this.props.stores.settings.all.app.lockedPassword : hash(String(settingsData.lockedPassword)), |
343 | useTouchIdToUnlock: Boolean(settingsData.useTouchIdToUnlock), | 345 | useTouchIdToUnlock: Boolean(settingsData.useTouchIdToUnlock), |
344 | inactivityLock: Number(settingsData.inactivityLock), | 346 | inactivityLock: Number(settingsData.inactivityLock), |
345 | scheduledDNDEnabled: Boolean(settingsData.scheduledDNDEnabled), | 347 | scheduledDNDEnabled: Boolean(settingsData.scheduledDNDEnabled), |