diff --git a/app/build.gradle b/app/build.gradle index 18d31ce32..0d0bcf3f9 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -43,7 +43,7 @@ dependencies { compile 'com.theartofdev.edmodo:android-image-cropper:2.3.1' compile 'com.booking:rtlviewpager:1.0.1' compile 'com.simplemobiletools:fileproperties:1.0.5@aar' - compile 'com.simplemobiletools:filepicker:1.4.5@aar' + compile 'com.simplemobiletools:filepicker:1.5.2@aar' compile 'com.bignerdranch.android:recyclerview-multiselect:0.2' compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" } diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt index 0dd8da69d..c9cc1aad0 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt @@ -182,7 +182,7 @@ class MainActivity : SimpleActivity(), GetDirectoriesAsynctask.GetDirectoriesLis if (dir.exists()) { val files = dir.listFiles() files.forEach { - if (it.isFile && it.isPhotoVideo()) { + if (it.isFile && it.isImageVideoGif()) { updatedFiles.add(it) deleteItem(it) } diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt index b95d69744..3c96af1d7 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt @@ -222,7 +222,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener { for (delPath in mToBeDeleted) { val file = File(delPath) - if (file.exists() && file.isPhotoVideo()) { + if (file.exists() && file.isImageVideoGif()) { if (needsStupidWritePermissions(file.absolutePath)) { if (isShowingPermDialog(file)) return 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 11015f699..908a2ef5c 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt @@ -256,11 +256,9 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View } private fun askConfirmDelete() { - ConfirmationDialog(this, listener = object : ConfirmationDialog.OnConfirmedListener { - override fun onConfirmed() { - notifyDeletion() - } - }) + ConfirmationDialog(this) { + notifyDeletion() + } } private fun notifyDeletion() { 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 c68c09ab7..bb4a71316 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt @@ -186,12 +186,10 @@ class DirectoryAdapter(val activity: SimpleActivity, val dirs: MutableList, } private fun askConfirmDelete() { - ConfirmationDialog(activity, listener = object : ConfirmationDialog.OnConfirmedListener { - override fun onConfirmed() { - actMode?.finish() - prepareForDeleting() - } - }) + ConfirmationDialog(activity) { + actMode?.finish() + prepareForDeleting() + } } private fun prepareForDeleting() {