mirror of
https://github.com/SimpleMobileTools/Simple-File-Manager.git
synced 2025-02-02 19:47:09 +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() {
|
private fun askConfirmDelete() {
|
||||||
activity.handleDeletePasswordProtection {
|
activity.handleDeletePasswordProtection {
|
||||||
val selectionSize = selectedKeys.size
|
val itemsCnt = selectedKeys.size
|
||||||
val items = resources.getQuantityString(R.plurals.delete_items, selectionSize, selectionSize)
|
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)
|
val question = String.format(resources.getString(R.string.deletion_confirmation), items)
|
||||||
ConfirmationDialog(activity, question) {
|
ConfirmationDialog(activity, question) {
|
||||||
deleteFiles()
|
deleteFiles()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user