do not list all folders being deleted, just the count
This commit is contained in:
parent
644fce6ef2
commit
dc600070af
|
@ -421,12 +421,13 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
||||||
|
|
||||||
override fun deleteFolders(folders: ArrayList<File>) {
|
override fun deleteFolders(folders: ArrayList<File>) {
|
||||||
val fileDirItems = folders.asSequence().filter { it.isDirectory }.map { FileDirItem(it.absolutePath, it.name, true) }.toMutableList() as ArrayList<FileDirItem>
|
val fileDirItems = folders.asSequence().filter { it.isDirectory }.map { FileDirItem(it.absolutePath, it.name, true) }.toMutableList() as ArrayList<FileDirItem>
|
||||||
if (fileDirItems.isEmpty()) {
|
when {
|
||||||
return
|
fileDirItems.isEmpty() -> return
|
||||||
}
|
fileDirItems.size == 1 -> toast(String.format(getString(R.string.deleting_folder), fileDirItems.first().name))
|
||||||
|
else -> {
|
||||||
fileDirItems.forEach {
|
val deletingItems = resources.getQuantityString(R.plurals.deleting_items, fileDirItems.size, fileDirItems.size)
|
||||||
toast(String.format(getString(R.string.deleting_folder), it.name))
|
toast(deletingItems)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.useRecycleBin) {
|
if (config.useRecycleBin) {
|
||||||
|
|
Loading…
Reference in New Issue