mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-30 00:17:58 +01:00
update the delete confirmation Dialog if we are using the recycle bin
This commit is contained in:
parent
3bedb2282c
commit
3468a9860b
3 changed files with 6 additions and 3 deletions
|
@ -829,7 +829,8 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
}
|
||||
|
||||
private fun askConfirmDelete() {
|
||||
DeleteWithRememberDialog(this, getString(R.string.proceed_with_deletion)) {
|
||||
val message = if (config.useRecycleBin) R.string.are_you_sure_recycle_bin else R.string.are_you_sure_delete
|
||||
DeleteWithRememberDialog(this, getString(message)) {
|
||||
config.tempSkipDeleteConfirmation = it
|
||||
deleteConfirmed()
|
||||
}
|
||||
|
|
|
@ -327,7 +327,8 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList<Directo
|
|||
} else {
|
||||
val itemsCnt = selectedPositions.size
|
||||
val items = resources.getQuantityString(R.plurals.delete_items, itemsCnt, itemsCnt)
|
||||
var question = String.format(resources.getString(R.string.deletion_confirmation), items)
|
||||
val baseString = if (config.useRecycleBin) R.string.move_to_recycle_bin_confirmation else R.string.deletion_confirmation
|
||||
var question = String.format(resources.getString(baseString), items)
|
||||
val warning = resources.getQuantityString(R.plurals.delete_warning, itemsCnt, itemsCnt)
|
||||
question += "\n\n$warning"
|
||||
ConfirmationDialog(activity, question) {
|
||||
|
|
|
@ -279,7 +279,8 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList<Thumbnai
|
|||
|
||||
private fun askConfirmDelete() {
|
||||
val items = resources.getQuantityString(R.plurals.delete_items, selectedPositions.size, selectedPositions.size)
|
||||
val question = String.format(resources.getString(R.string.deletion_confirmation), items)
|
||||
val baseString = if (config.useRecycleBin) R.string.move_to_recycle_bin_confirmation else R.string.deletion_confirmation
|
||||
val question = String.format(resources.getString(baseString), items)
|
||||
DeleteWithRememberDialog(activity, question) {
|
||||
config.tempSkipDeleteConfirmation = it
|
||||
deleteFiles()
|
||||
|
|
Loading…
Reference in a new issue