aboutsummaryrefslogtreecommitdiffstats
path: root/src/containers
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2021-05-13 11:58:35 +0200
committerLibravatar GitHub <noreply@github.com>2021-05-13 11:58:35 +0200
commit5db9f585e8cec20abdadf431d667422af66cf692 (patch)
treec1d7d57c5d9370385249acba1bedcfb931d42158 /src/containers
parentNew Crowdin updates for Japanese (#1406) (diff)
downloadferdium-app-5db9f585e8cec20abdadf431d667422af66cf692.tar.gz
ferdium-app-5db9f585e8cec20abdadf431d667422af66cf692.tar.zst
ferdium-app-5db9f585e8cec20abdadf431d667422af66cf692.zip
Lazily compute cache size (#1404)
Computing the cache size can take a long time if the cache is large. Previously, cache size computation was triggered by opening the Settings pane, which slowed down changing settings even if the user wasn't interested in the cache size. This patch defers cache size computation until the Advanced tab is open in the Setting page. Additionally, cache size rendering (in MB / GB) is moved from the AppStore into the EditSettingsForm to fix the notCleared functionality.
Diffstat (limited to 'src/containers')
-rw-r--r--src/containers/settings/EditSettingsScreen.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/containers/settings/EditSettingsScreen.js b/src/containers/settings/EditSettingsScreen.js
index 94c53fc90..49ef03664 100644
--- a/src/containers/settings/EditSettingsScreen.js
+++ b/src/containers/settings/EditSettingsScreen.js
@@ -587,7 +587,6 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e
587 } = this.props.stores; 587 } = this.props.stores;
588 const { 588 const {
589 updateStatus, 589 updateStatus,
590 cacheSize,
591 updateStatusTypes, 590 updateStatusTypes,
592 isClearingAllCache, 591 isClearingAllCache,
593 lockingFeatureEnabled, 592 lockingFeatureEnabled,
@@ -610,7 +609,7 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e
610 noUpdateAvailable={updateStatus === updateStatusTypes.NOT_AVAILABLE} 609 noUpdateAvailable={updateStatus === updateStatusTypes.NOT_AVAILABLE}
611 updateIsReadyToInstall={updateStatus === updateStatusTypes.DOWNLOADED} 610 updateIsReadyToInstall={updateStatus === updateStatusTypes.DOWNLOADED}
612 onSubmit={d => this.onSubmit(d)} 611 onSubmit={d => this.onSubmit(d)}
613 cacheSize={cacheSize} 612 getCacheSize={() => app.cacheSize}
614 isClearingAllCache={isClearingAllCache} 613 isClearingAllCache={isClearingAllCache}
615 onClearAllCache={clearAllCache} 614 onClearAllCache={clearAllCache}
616 isSpellcheckerIncludedInCurrentPlan={spellcheckerConfig.isIncludedInCurrentPlan} 615 isSpellcheckerIncludedInCurrentPlan={spellcheckerConfig.isIncludedInCurrentPlan}