do not cache media while temporarily showing hidden is enabled

This commit is contained in:
tibbi 2017-05-28 23:09:00 +02:00
parent 1b53acd096
commit e3f0d7ea56
2 changed files with 9 additions and 5 deletions

View file

@ -342,9 +342,11 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
}
private fun storeDirectories() {
if (!config.temporarilyShowHidden) {
val directories = Gson().toJson(mDirs)
config.directories = directories
}
}
private fun setupAdapter() {
val adapter = DirectoryAdapter(this, mDirs, this) {

View file

@ -399,10 +399,12 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
}
private fun storeFolder() {
if (!config.temporarilyShowHidden) {
val subList = mMedia.subList(0, Math.min(SAVE_MEDIA_CNT, mMedia.size))
val json = Gson().toJson(subList)
config.saveFolderMedia(mPath, json)
}
}
override fun deleteFiles(files: ArrayList<File>) {
val filtered = files.filter { it.isImageVideoGif() } as ArrayList