From a2bcfdbc7c7657c0b2089f92933e56aca90dc6cc Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 22 Nov 2016 20:52:01 +0100 Subject: [PATCH] update filepicker to 1.5.2 --- app/build.gradle | 2 +- .../gallery/activities/MainActivity.kt | 2 +- .../gallery/activities/MediaActivity.kt | 2 +- .../gallery/activities/ViewPagerActivity.kt | 8 +++----- .../gallery/adapters/DirectoryAdapter.kt | 10 ++++------ .../simplemobiletools/gallery/adapters/MediaAdapter.kt | 10 ++++------ 6 files changed, 14 insertions(+), 20 deletions(-) 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() {