mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 22:47:59 +01:00
limit the cached folders size to 60 just to be sure
This commit is contained in:
parent
e62971d25a
commit
42bd31f38b
3 changed files with 4 additions and 2 deletions
|
@ -602,7 +602,8 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
||||||
|
|
||||||
private fun storeDirectories() {
|
private fun storeDirectories() {
|
||||||
if (!config.temporarilyShowHidden && config.tempFolderPath.isEmpty()) {
|
if (!config.temporarilyShowHidden && config.tempFolderPath.isEmpty()) {
|
||||||
val directories = Gson().toJson(mDirs)
|
val subList = mDirs.subList(0, Math.min(SAVE_DIRS_CNT, mDirs.size))
|
||||||
|
val directories = Gson().toJson(subList)
|
||||||
config.directories = directories
|
config.directories = directories
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,6 @@ import java.io.File
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
|
||||||
class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
||||||
private val SAVE_MEDIA_CNT = 80
|
|
||||||
private val LAST_MEDIA_CHECK_PERIOD = 3000L
|
private val LAST_MEDIA_CHECK_PERIOD = 3000L
|
||||||
|
|
||||||
private var mPath = ""
|
private var mPath = ""
|
||||||
|
|
|
@ -65,6 +65,8 @@ const val MAX_COLUMN_COUNT = 20
|
||||||
const val SHOW_TEMP_HIDDEN_DURATION = 600000L
|
const val SHOW_TEMP_HIDDEN_DURATION = 600000L
|
||||||
const val CLICK_MAX_DURATION = 150
|
const val CLICK_MAX_DURATION = 150
|
||||||
const val DRAG_THRESHOLD = 8
|
const val DRAG_THRESHOLD = 8
|
||||||
|
const val SAVE_DIRS_CNT = 60
|
||||||
|
const val SAVE_MEDIA_CNT = 80
|
||||||
|
|
||||||
const val DIRECTORY = "directory"
|
const val DIRECTORY = "directory"
|
||||||
const val MEDIUM = "medium"
|
const val MEDIUM = "medium"
|
||||||
|
|
Loading…
Reference in a new issue