From fc47d41c40652520a11cd6679193dcfcfcd76ece Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 23 Oct 2018 16:13:54 +0200 Subject: [PATCH] adding an initial implementation of batch renaming, multiple items at once --- .../filemanager/adapters/ItemsAdapter.kt | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/adapters/ItemsAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/adapters/ItemsAdapter.kt index bff7eed5..85aa7e5e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/adapters/ItemsAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/adapters/ItemsAdapter.kt @@ -58,7 +58,6 @@ class ItemsAdapter(activity: SimpleActivity, var fileDirItems: MutableList + if (paths.size == 1) { + val oldPath = paths.first() + RenameItemDialog(activity, oldPath) { + activity.config.moveFavorite(oldPath, it) + activity.runOnUiThread { + listener?.refreshItems() + finishActMode() + } + } + } else { + RenameItemsDialog(activity, paths) { + activity.runOnUiThread { + listener?.refreshItems() + finishActMode() + } } } }