From c6c945eb360871499471106652703bb1d064388b Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 15 Jan 2017 11:46:21 +0100 Subject: [PATCH] cache 40 photos per folder --- .../com/simplemobiletools/gallery/activities/MediaActivity.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 28c557bdb..1af5cfc4f 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt @@ -31,6 +31,7 @@ import java.util.* class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener { private val TAG = MediaActivity::class.java.simpleName + private val SAVE_MEDIA_CNT = 40 private var mMedia = ArrayList() @@ -291,7 +292,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener { } private fun storeFolder() { - val subList = mMedia.subList(0, Math.min(30, mMedia.size)) + val subList = mMedia.subList(0, Math.min(SAVE_MEDIA_CNT, mMedia.size)) val json = Gson().toJson(subList) config.saveFolderMedia(mPath, json) }