let the user know if some files couldnt be copied / moved

This commit is contained in:
tibbi
2016-11-12 21:47:01 +01:00
parent f457c2842c
commit 21a5f8d685
9 changed files with 43 additions and 25 deletions

View File

@ -92,14 +92,14 @@ class CopyDialog(val activity: SimpleActivity, val files: ArrayList<File>, val c
updatedFiles.addAll(files)
for (file in files) {
val destination = File(destinationDir, file.name)
file.renameTo(destination)
updatedFiles.add(destination)
if (file.renameTo(destination))
updatedFiles.add(destination)
}
context.scanFiles(updatedFiles) {}
context.toast(R.string.moving_success)
dismiss()
copyMoveListener.copySucceeded(true)
copyMoveListener.copySucceeded(true, files.size * 2 == updatedFiles.size)
}
}
})