diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt index 747757778..585fe2df2 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt @@ -1078,7 +1078,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View } 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 if (remember) { @@ -1087,7 +1087,6 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View deleteConfirmed(skipRecycleBin) } - DeleteWithRememberDialog(this, message, config.useRecycleBin, callback) } private fun deleteConfirmed(skipRecycleBin: Boolean) { diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/MediaAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/MediaAdapter.kt index 7b6a86fd5..13bf88b8a 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/MediaAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/MediaAdapter.kt @@ -509,7 +509,7 @@ class MediaAdapter( 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 callback = fun(remember: Boolean, skipRecycleBin: Boolean) { + DeleteWithRememberDialog(activity, question, config.useRecycleBin) { remember, skipRecycleBin -> config.tempSkipDeleteConfirmation = remember if (remember) { @@ -518,7 +518,6 @@ class MediaAdapter( deleteFiles(skipRecycleBin) } - DeleteWithRememberDialog(activity, question, config.useRecycleBin, callback) } private fun deleteFiles(skipRecycleBin: Boolean) {