Changes for readability
This commit is contained in:
parent
fb17549173
commit
914d97c231
2 changed files with 8 additions and 2 deletions
|
@ -602,7 +602,10 @@ class DirectoryAdapter(
|
|||
} else {
|
||||
val paths = getSelectedPaths()
|
||||
val fileDirItems = ArrayList<FileDirItem>(paths.size)
|
||||
paths.forEach { fileDirItems.add(File(it).toFileDirItem(activity)) }
|
||||
paths.forEach {
|
||||
val fileDirItem = FileDirItem(it, it.getFilenameFromPath(), activity.getIsPathDirectory(it))
|
||||
fileDirItems.add(fileDirItem)
|
||||
}
|
||||
val size = fileDirItems.sumByLong { it.getProperSize(activity, countHidden = true) }.formatSize()
|
||||
"${resources.getQuantityString(R.plurals.delete_items, itemsCnt, itemsCnt)} ($size)"
|
||||
}
|
||||
|
|
|
@ -470,7 +470,10 @@ class MediaAdapter(
|
|||
} else {
|
||||
val paths = getSelectedPaths()
|
||||
val fileDirItems = ArrayList<FileDirItem>(paths.size)
|
||||
paths.forEach { fileDirItems.add(File(it).toFileDirItem(activity)) }
|
||||
paths.forEach {
|
||||
val fileDirItem = FileDirItem(it, it.getFilenameFromPath(), activity.getIsPathDirectory(it))
|
||||
fileDirItems.add(fileDirItem)
|
||||
}
|
||||
val size = fileDirItems.sumByLong { it.getProperSize(activity, countHidden = true) }.formatSize()
|
||||
"${resources.getQuantityString(R.plurals.delete_items, itemsCnt, itemsCnt)} ($size)"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue