diff options
author | Stefan Malzner <stefan@adlk.io> | 2019-10-02 09:55:12 +0200 |
---|---|---|
committer | Stefan Malzner <stefan@adlk.io> | 2019-10-02 09:55:12 +0200 |
commit | a31566db76a20e1cb91de0aa26cace70b450acfa (patch) | |
tree | d4f154278c7760eee7cd4c4ec5467a7f1400b1b9 | |
parent | Update clear cache to electron promise APIs (diff) | |
download | ferdium-app-a31566db76a20e1cb91de0aa26cace70b450acfa.tar.gz ferdium-app-a31566db76a20e1cb91de0aa26cace70b450acfa.tar.zst ferdium-app-a31566db76a20e1cb91de0aa26cace70b450acfa.zip |
fix(Settings): Fix cache size calculation after clearing cache
-rw-r--r-- | src/stores/AppStore.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js index 315235ba4..0398b7533 100644 --- a/src/stores/AppStore.js +++ b/src/stores/AppStore.js | |||
@@ -23,6 +23,7 @@ import { getLocale } from '../helpers/i18n-helpers'; | |||
23 | 23 | ||
24 | import { getServiceIdsFromPartitions, removeServicePartitionDirectory } from '../helpers/service-helpers.js'; | 24 | import { getServiceIdsFromPartitions, removeServicePartitionDirectory } from '../helpers/service-helpers.js'; |
25 | import { isValidExternalURL } from '../helpers/url-helpers'; | 25 | import { isValidExternalURL } from '../helpers/url-helpers'; |
26 | import { sleep } from '../helpers/async-helpers'; | ||
26 | 27 | ||
27 | const debug = require('debug')('Franz:AppStore'); | 28 | const debug = require('debug')('Franz:AppStore'); |
28 | 29 | ||
@@ -327,6 +328,8 @@ export default class AppStore extends Store { | |||
327 | 328 | ||
328 | await clearAppCache._promise; | 329 | await clearAppCache._promise; |
329 | 330 | ||
331 | await sleep(ms('1s')); | ||
332 | |||
330 | this.getAppCacheSizeRequest.execute(); | 333 | this.getAppCacheSizeRequest.execute(); |
331 | 334 | ||
332 | this.isClearingAllCache = false; | 335 | this.isClearingAllCache = false; |