move last callback param of DeleteWithRememberDialog out of the parentheses for better readability
This commit is contained in:
parent
8a79504e4b
commit
116359c0c6
2 changed files with 2 additions and 4 deletions
|
@ -1078,7 +1078,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
}
|
}
|
||||||
|
|
||||||
val message = String.format(resources.getString(baseString), filenameAndSize)
|
val message = String.format(resources.getString(baseString), filenameAndSize)
|
||||||
val callback = fun(remember: Boolean, skipRecycleBin: Boolean) {
|
DeleteWithRememberDialog(this, message, config.useRecycleBin) { remember, skipRecycleBin ->
|
||||||
config.tempSkipDeleteConfirmation = remember
|
config.tempSkipDeleteConfirmation = remember
|
||||||
|
|
||||||
if (remember) {
|
if (remember) {
|
||||||
|
@ -1087,7 +1087,6 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
|
|
||||||
deleteConfirmed(skipRecycleBin)
|
deleteConfirmed(skipRecycleBin)
|
||||||
}
|
}
|
||||||
DeleteWithRememberDialog(this, message, config.useRecycleBin, callback)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun deleteConfirmed(skipRecycleBin: Boolean) {
|
private fun deleteConfirmed(skipRecycleBin: Boolean) {
|
||||||
|
|
|
@ -509,7 +509,7 @@ class MediaAdapter(
|
||||||
if (config.useRecycleBin && !config.tempSkipRecycleBin && !isRecycleBin) R.string.move_to_recycle_bin_confirmation else R.string.deletion_confirmation
|
if (config.useRecycleBin && !config.tempSkipRecycleBin && !isRecycleBin) R.string.move_to_recycle_bin_confirmation else R.string.deletion_confirmation
|
||||||
val question = String.format(resources.getString(baseString), itemsAndSize)
|
val question = String.format(resources.getString(baseString), itemsAndSize)
|
||||||
|
|
||||||
val callback = fun(remember: Boolean, skipRecycleBin: Boolean) {
|
DeleteWithRememberDialog(activity, question, config.useRecycleBin) { remember, skipRecycleBin ->
|
||||||
config.tempSkipDeleteConfirmation = remember
|
config.tempSkipDeleteConfirmation = remember
|
||||||
|
|
||||||
if (remember) {
|
if (remember) {
|
||||||
|
@ -518,7 +518,6 @@ class MediaAdapter(
|
||||||
|
|
||||||
deleteFiles(skipRecycleBin)
|
deleteFiles(skipRecycleBin)
|
||||||
}
|
}
|
||||||
DeleteWithRememberDialog(activity, question, config.useRecycleBin, callback)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun deleteFiles(skipRecycleBin: Boolean) {
|
private fun deleteFiles(skipRecycleBin: Boolean) {
|
||||||
|
|
Loading…
Reference in a new issue