simplify sendsuccess at renaming dir

This commit is contained in:
tibbi 2016-11-17 16:11:11 +01:00
parent 06f7d8d29d
commit 83dc85e63b
1 changed files with 1 additions and 3 deletions

View File

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