mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-23 04:57:59 +01:00
fix #807, show a warning when deleting a folder
This commit is contained in:
parent
284a12666f
commit
b80e02d14f
2 changed files with 6 additions and 3 deletions
|
@ -47,7 +47,7 @@ ext {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.simplemobiletools:commons:4.1.10'
|
implementation 'com.simplemobiletools:commons:4.1.11'
|
||||||
implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.0'
|
implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.0'
|
||||||
implementation 'com.android.support:multidex:1.0.3'
|
implementation 'com.android.support:multidex:1.0.3'
|
||||||
implementation 'it.sephiroth.android.exif:library:1.0.1'
|
implementation 'it.sephiroth.android.exif:library:1.0.1'
|
||||||
|
|
|
@ -317,8 +317,11 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList<Directo
|
||||||
if (config.skipDeleteConfirmation) {
|
if (config.skipDeleteConfirmation) {
|
||||||
deleteFiles()
|
deleteFiles()
|
||||||
} else {
|
} else {
|
||||||
val items = resources.getQuantityString(R.plurals.delete_items, selectedPositions.size, selectedPositions.size)
|
val itemsCnt = selectedPositions.size
|
||||||
val question = String.format(resources.getString(R.string.deletion_confirmation), items)
|
val items = resources.getQuantityString(R.plurals.delete_items, itemsCnt, itemsCnt)
|
||||||
|
var question = String.format(resources.getString(R.string.deletion_confirmation), items)
|
||||||
|
val warning = resources.getQuantityString(R.plurals.delete_warning, itemsCnt, itemsCnt)
|
||||||
|
question += "\n\n$warning"
|
||||||
ConfirmationDialog(activity, question) {
|
ConfirmationDialog(activity, question) {
|
||||||
deleteFiles()
|
deleteFiles()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue