From 624682d791534955ba8ba3e35a0b9f443826b1a6 Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 23 Jan 2018 18:55:38 +0100 Subject: [PATCH] update commons to 3.8.2 --- app/build.gradle | 2 +- .../simplemobiletools/gallery/activities/EditActivity.kt | 2 +- .../gallery/activities/IncludedFoldersActivity.kt | 2 +- .../gallery/activities/PhotoVideoActivity.kt | 4 ++-- .../gallery/activities/ViewPagerActivity.kt | 7 ++++--- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 3cf6f5c73..0cc7e18b1 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -43,7 +43,7 @@ ext { } dependencies { - implementation 'com.simplemobiletools:commons:3.8.1' + implementation 'com.simplemobiletools:commons:3.8.2' 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/EditActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/EditActivity.kt index 4c2dc55f4..8e3d4d6c4 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/EditActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/EditActivity.kt @@ -228,7 +228,7 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener } private fun scanFinalPath(path: String) { - applicationContext.scanPath(path) { + scanPath(path) { setResult(Activity.RESULT_OK, intent) toast(R.string.file_saved) finish() diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/IncludedFoldersActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/IncludedFoldersActivity.kt index a7a3229b5..cb565c6b3 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/IncludedFoldersActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/IncludedFoldersActivity.kt @@ -55,7 +55,7 @@ class IncludedFoldersActivity : SimpleActivity(), RefreshRecyclerViewListener { config.addIncludedFolder(it) updateFolders() Thread { - applicationContext.scanPath(it) + scanPath(it) }.start() } } diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/PhotoVideoActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/PhotoVideoActivity.kt index c86e22888..aba3b7060 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/PhotoVideoActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/PhotoVideoActivity.kt @@ -64,14 +64,14 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList mIsFromGallery = intent.getBooleanExtra(IS_FROM_GALLERY, false) if (mUri!!.scheme == "file") { - applicationContext.scanPath(mUri!!.path) + scanPath(mUri!!.path) sendViewPagerIntent(mUri!!.path) finish() return } else { val path = applicationContext.getRealPathFromURI(mUri!!) ?: "" if (path != mUri.toString() && path.isNotEmpty() && mUri!!.authority != "mms") { - applicationContext.scanPath(mUri!!.path) + scanPath(mUri!!.path) sendViewPagerIntent(path) finish() 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 30f8d5ae2..22f5b03c0 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt @@ -3,6 +3,7 @@ package com.simplemobiletools.gallery.activities import android.animation.Animator import android.animation.ValueAnimator import android.app.Activity +import android.content.Context import android.content.Intent import android.content.pm.ActivityInfo import android.content.res.Configuration @@ -205,7 +206,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View } reloadViewPager() - applicationContext.scanPath(mPath) + scanPath(mPath) if (config.blackBackground) { view_pager.background = ColorDrawable(Color.BLACK) @@ -530,7 +531,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View deleteFile(newFile) } copyFile(tmpFile, newFile) - applicationContext.scanFile(newFile) + scanFile(newFile) toast(R.string.file_saved) if (config.keepLastModified) { @@ -799,7 +800,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View deleteFile(file, true) } - applicationContext.scanPath(mDirectory) + scanPath(mDirectory) } private fun checkOrientation() {