diff options
Diffstat (limited to 'src/stores')
-rw-r--r-- | src/stores/AppStore.js | 3 | ||||
-rw-r--r-- | src/stores/SettingsStore.js | 11 |
2 files changed, 13 insertions, 1 deletions
diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js index 5bae6e8d4..40d98cf42 100644 --- a/src/stores/AppStore.js +++ b/src/stores/AppStore.js | |||
@@ -22,6 +22,7 @@ import { getLocale } from '../helpers/i18n-helpers'; | |||
22 | 22 | ||
23 | import { getServiceIdsFromPartitions, removeServicePartitionDirectory } from '../helpers/service-helpers.js'; | 23 | import { getServiceIdsFromPartitions, removeServicePartitionDirectory } from '../helpers/service-helpers.js'; |
24 | import { isValidExternalURL } from '../helpers/url-helpers'; | 24 | import { isValidExternalURL } from '../helpers/url-helpers'; |
25 | import { sleep } from '../helpers/async-helpers'; | ||
25 | 26 | ||
26 | const debug = require('debug')('Ferdi:AppStore'); | 27 | const debug = require('debug')('Ferdi:AppStore'); |
27 | 28 | ||
@@ -317,6 +318,8 @@ export default class AppStore extends Store { | |||
317 | 318 | ||
318 | await clearAppCache._promise; | 319 | await clearAppCache._promise; |
319 | 320 | ||
321 | await sleep(ms('1s')); | ||
322 | |||
320 | this.getAppCacheSizeRequest.execute(); | 323 | this.getAppCacheSizeRequest.execute(); |
321 | 324 | ||
322 | this.isClearingAllCache = false; | 325 | this.isClearingAllCache = false; |
diff --git a/src/stores/SettingsStore.js b/src/stores/SettingsStore.js index c09f24af7..8c4cd47eb 100644 --- a/src/stores/SettingsStore.js +++ b/src/stores/SettingsStore.js | |||
@@ -71,12 +71,21 @@ export default class SettingsStore extends Store { | |||
71 | // Make sure to lock app on launch if locking feature is enabled | 71 | // Make sure to lock app on launch if locking feature is enabled |
72 | setTimeout(() => { | 72 | setTimeout(() => { |
73 | if (this.all.app.lockingFeatureEnabled) { | 73 | if (this.all.app.lockingFeatureEnabled) { |
74 | // Disable lock first - otherwise the lock might not get activated corrently | ||
74 | this.actions.settings.update({ | 75 | this.actions.settings.update({ |
75 | type: 'app', | 76 | type: 'app', |
76 | data: { | 77 | data: { |
77 | locked: true, | 78 | locked: false, |
78 | }, | 79 | }, |
79 | }); | 80 | }); |
81 | setTimeout(() => { | ||
82 | this.actions.settings.update({ | ||
83 | type: 'app', | ||
84 | data: { | ||
85 | locked: true, | ||
86 | }, | ||
87 | }); | ||
88 | }, 0); | ||
80 | } | 89 | } |
81 | }, 1000); | 90 | }, 1000); |
82 | } | 91 | } |