mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 22:47:59 +01:00
cache 40 photos per folder
This commit is contained in:
parent
77781a2e71
commit
c6c945eb36
1 changed files with 2 additions and 1 deletions
|
@ -31,6 +31,7 @@ import java.util.*
|
||||||
|
|
||||||
class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
||||||
private val TAG = MediaActivity::class.java.simpleName
|
private val TAG = MediaActivity::class.java.simpleName
|
||||||
|
private val SAVE_MEDIA_CNT = 40
|
||||||
|
|
||||||
private var mMedia = ArrayList<Medium>()
|
private var mMedia = ArrayList<Medium>()
|
||||||
|
|
||||||
|
@ -291,7 +292,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun storeFolder() {
|
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)
|
val json = Gson().toJson(subList)
|
||||||
config.saveFolderMedia(mPath, json)
|
config.saveFolderMedia(mPath, json)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue