add a arraylist size check at copy dialog

This commit is contained in:
tibbi 2017-04-01 09:23:34 +02:00
parent 0228f5505a
commit 599f93b458

View file

@ -228,6 +228,9 @@ class DirectoryAdapter(val activity: SimpleActivity, val dirs: MutableList<Direc
private fun displayCopyDialog() {
val files = ArrayList<File>()
val positions = multiSelector.selectedPositions
if (positions.isEmpty())
return
positions.forEach {
val dir = File(dirs[it].path)
files.addAll(dir.listFiles().filter { it.isFile && it.isImageVideoGif() })