cache 40 photos per folder

This commit is contained in:
tibbi 2017-01-15 11:46:21 +01:00
parent 77781a2e71
commit c6c945eb36
1 changed files with 2 additions and 1 deletions

View File

@ -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<Medium>()
@ -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)
}