use a better confirmation dialog text at clearing the recycle bin
This commit is contained in:
parent
851fddc67a
commit
4a20695d77
1 changed files with 16 additions and 12 deletions
|
@ -503,18 +503,22 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList<Directo
|
|||
config.skipDeleteConfirmation -> deleteFolders()
|
||||
else -> {
|
||||
val itemsCnt = selectedKeys.size
|
||||
val items = if (itemsCnt == 1) {
|
||||
var folder = getSelectedPaths().first().getFilenameFromPath()
|
||||
if (folder == RECYCLE_BIN) {
|
||||
folder = activity.getString(R.string.recycle_bin)
|
||||
if (itemsCnt == 1 && getSelectedItems().first().isRecycleBin()) {
|
||||
ConfirmationDialog(activity, "", R.string.empty_recycle_bin_confirmation, R.string.yes, R.string.no) {
|
||||
deleteFolders()
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
val items = if (itemsCnt == 1) {
|
||||
val folder = getSelectedPaths().first().getFilenameFromPath()
|
||||
"\"$folder\""
|
||||
} else {
|
||||
resources.getQuantityString(R.plurals.delete_items, itemsCnt, itemsCnt)
|
||||
}
|
||||
|
||||
val fileDirItem = getFirstSelectedItem() ?: return
|
||||
val baseString = if (!config.useRecycleBin || (isOneItemSelected() && fileDirItem.isRecycleBin()) || (isOneItemSelected() && fileDirItem.areFavorites())) {
|
||||
val baseString = if (!config.useRecycleBin || (isOneItemSelected() && fileDirItem.areFavorites())) {
|
||||
R.string.deletion_confirmation
|
||||
} else {
|
||||
R.string.move_to_recycle_bin_confirmation
|
||||
|
|
Loading…
Reference in a new issue