Image loading fixed

This commit is contained in:
Pupil
2020-02-23 21:18:19 +09:00
parent 03444f070f
commit 9bddf95013
7 changed files with 40 additions and 11 deletions

View File

@@ -961,7 +961,9 @@ class MainActivity : AppCompatActivity() {
}
Mode.DOWNLOAD -> {
val downloads = getDownloadDirectory(this@MainActivity).listFiles()?.filter { file ->
file.isDirectory && (file.name.toIntOrNull() != null) && File(file, ".metadata").exists()
file.isDirectory && file.name.toIntOrNull() != null
}?.sortedByDescending {
it.lastModified()
}?.map {
it.name.toInt()
} ?: emptyList()