From 80c9044eab7e2106408a7a0472f2066f5731505c Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 7 Jan 2017 17:27:41 +0100 Subject: [PATCH] rescan paths obtained from third parties --- .../simplemobiletools/gallery/activities/PhotoVideoActivity.kt | 3 +++ 1 file changed, 3 insertions(+) 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 41f6bf951..2c76c1396 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/PhotoVideoActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/PhotoVideoActivity.kt @@ -7,6 +7,7 @@ import android.provider.MediaStore import android.view.Menu import android.view.MenuItem import android.view.View +import com.simplemobiletools.commons.extensions.scanPath import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.extensions.* import com.simplemobiletools.gallery.fragments.PhotoFragment @@ -34,11 +35,13 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList mUri = intent.data ?: return if (mUri.scheme == "file") { + scanPath(mUri.path) {} sendViewPagerIntent(mUri.path) finish() return } else { val path = applicationContext.getRealPathFromURI(mUri) ?: "" + scanPath(mUri.path) {} if (path.isNotEmpty()) { sendViewPagerIntent(path) finish()