simplify sendsuccess at renaming dir

This commit is contained in:
tibbi 2016-11-17 16:11:11 +01:00
parent 06f7d8d29d
commit 83dc85e63b

View file

@ -67,9 +67,7 @@ class RenameDirectoryDialog(val activity: SimpleActivity, val dir: File, val lis
private fun sendSuccess(updatedFiles: ArrayList<String>, newDir: File) { private fun sendSuccess(updatedFiles: ArrayList<String>, newDir: File) {
context.toast(R.string.renaming_folder) context.toast(R.string.renaming_folder)
val files = newDir.listFiles() val files = newDir.listFiles()
for (file in files) { files.mapTo(updatedFiles) { it.absolutePath }
updatedFiles.add(file.absolutePath)
}
updatedFiles.add(newDir.absolutePath) updatedFiles.add(newDir.absolutePath)
listener.onRenameDirSuccess(updatedFiles) listener.onRenameDirSuccess(updatedFiles)