diff --git a/app/build.gradle b/app/build.gradle index cf8c2d5be..1766d3de5 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -46,7 +46,7 @@ ext { } dependencies { - implementation 'com.simplemobiletools:commons:3.12.22' + implementation 'com.simplemobiletools:commons:3.12.24' implementation 'com.theartofdev.edmodo:android-image-cropper:2.6.0' implementation 'com.android.support:multidex:1.0.2' implementation 'com.google.code.gson:gson:2.8.2' diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt index 4d16a3980..09e3c774c 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt @@ -63,6 +63,7 @@ class SettingsActivity : SimpleActivity() { setupShowExtendedDetails() setupHideExtendedDetails() setupManageExtendedDetails() + setupSkipDeleteConfirmation() updateTextColors(settings_holder) setupSectionColors() } @@ -363,6 +364,14 @@ class SettingsActivity : SimpleActivity() { } } + private fun setupSkipDeleteConfirmation() { + settings_skip_delete_confirmation.isChecked = config.skipDeleteConfirmation + settings_skip_delete_confirmation_holder.setOnClickListener { + settings_skip_delete_confirmation.toggle() + config.skipDeleteConfirmation = settings_skip_delete_confirmation.isChecked + } + } + private fun setupScreenRotation() { settings_screen_rotation.text = getScreenRotationText() settings_screen_rotation_holder.setOnClickListener { diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt index e5ae3cc86..386737db0 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt @@ -724,7 +724,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View } private fun checkDeleteConfirmation() { - if (mSkipConfirmationDialog) { + if (mSkipConfirmationDialog || config.skipDeleteConfirmation) { deleteConfirmed() } else { askConfirmDelete() diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt index 91d11445d..8cc83bb5d 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt @@ -233,8 +233,12 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: MutableList, } private fun checkDeleteConfirmation() { - if (skipConfirmationDialog) { + if (skipConfirmationDialog || config.skipDeleteConfirmation) { deleteFiles() } else { askConfirmDelete() diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index 98d195bbb..c1bfe8b79 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -895,5 +895,28 @@ android:text="@string/keep_last_modified"/> + + + + + +