mirror of
https://github.com/SimpleMobileTools/Simple-File-Manager.git
synced 2025-01-07 14:42:19 +01:00
show the file name at deletion, if it is only one item
This commit is contained in:
parent
1b1508282a
commit
004fc2f362
@ -638,8 +638,13 @@ class ItemsAdapter(activity: SimpleActivity, var listItems: MutableList<ListItem
|
||||
|
||||
private fun askConfirmDelete() {
|
||||
activity.handleDeletePasswordProtection {
|
||||
val selectionSize = selectedKeys.size
|
||||
val items = resources.getQuantityString(R.plurals.delete_items, selectionSize, selectionSize)
|
||||
val itemsCnt = selectedKeys.size
|
||||
val items = if (itemsCnt == 1) {
|
||||
"\"${getFirstSelectedItemPath().getFilenameFromPath()}\""
|
||||
} else {
|
||||
resources.getQuantityString(R.plurals.delete_items, itemsCnt, itemsCnt)
|
||||
}
|
||||
|
||||
val question = String.format(resources.getString(R.string.deletion_confirmation), items)
|
||||
ConfirmationDialog(activity, question) {
|
||||
deleteFiles()
|
||||
|
Loading…
Reference in New Issue
Block a user