update commons to 3.8.2

This commit is contained in:
tibbi 2018-01-23 18:55:38 +01:00
parent 96010b4c8e
commit 624682d791
5 changed files with 9 additions and 8 deletions

View File

@ -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'

View File

@ -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()

View File

@ -55,7 +55,7 @@ class IncludedFoldersActivity : SimpleActivity(), RefreshRecyclerViewListener {
config.addIncludedFolder(it)
updateFolders()
Thread {
applicationContext.scanPath(it)
scanPath(it)
}.start()
}
}

View File

@ -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

View File

@ -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() {