From fe7b425d799ab8e828ded6e25ead90147dc09a08 Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 31 Jan 2018 19:23:03 +0100 Subject: [PATCH] store thumbnail data only if we arent loading them from cache --- .../com/simplemobiletools/gallery/activities/MainActivity.kt | 4 +++- .../simplemobiletools/gallery/activities/MediaActivity.kt | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt index 25da562e2..6b722080a 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt @@ -574,7 +574,9 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener { setupAdapter() } - storeDirectories() + if (!isFromCache) { + storeDirectories() + } } private fun storeDirectories() { diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt index 8a1f25b9c..29b64841d 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt @@ -620,7 +620,10 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener { runOnUiThread { setupAdapter() } - storeFolder() + + if (!isFromCache) { + storeFolder() + } } private fun storeFolder() {