From d40294a822bdbfc2c03d30a763981ca94a4056f9 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 4 Jul 2021 22:03:33 +0200 Subject: [PATCH] optimize settings cache calculation --- .../gallery/pro/activities/SettingsActivity.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/SettingsActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/SettingsActivity.kt index 50cf0ba64..c27fd6530 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/SettingsActivity.kt @@ -614,8 +614,9 @@ class SettingsActivity : SimpleActivity() { private fun setupClearCache() { ensureBackgroundThread { + val size = cacheDir.getProperSize(true).formatSize() runOnUiThread { - settings_clear_cache_size.text = cacheDir.getProperSize(true).formatSize() + settings_clear_cache_size.text = size } }