mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2024-12-23 06:36:27 +01:00
cache 40 photos per folder
This commit is contained in:
parent
77781a2e71
commit
c6c945eb36
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user