mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-30 00:17:58 +01:00
rescan paths obtained from third parties
This commit is contained in:
parent
ae970c3685
commit
80c9044eab
1 changed files with 3 additions and 0 deletions
|
@ -7,6 +7,7 @@ import android.provider.MediaStore
|
||||||
import android.view.Menu
|
import android.view.Menu
|
||||||
import android.view.MenuItem
|
import android.view.MenuItem
|
||||||
import android.view.View
|
import android.view.View
|
||||||
|
import com.simplemobiletools.commons.extensions.scanPath
|
||||||
import com.simplemobiletools.gallery.R
|
import com.simplemobiletools.gallery.R
|
||||||
import com.simplemobiletools.gallery.extensions.*
|
import com.simplemobiletools.gallery.extensions.*
|
||||||
import com.simplemobiletools.gallery.fragments.PhotoFragment
|
import com.simplemobiletools.gallery.fragments.PhotoFragment
|
||||||
|
@ -34,11 +35,13 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList
|
||||||
mUri = intent.data ?: return
|
mUri = intent.data ?: return
|
||||||
|
|
||||||
if (mUri.scheme == "file") {
|
if (mUri.scheme == "file") {
|
||||||
|
scanPath(mUri.path) {}
|
||||||
sendViewPagerIntent(mUri.path)
|
sendViewPagerIntent(mUri.path)
|
||||||
finish()
|
finish()
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
val path = applicationContext.getRealPathFromURI(mUri) ?: ""
|
val path = applicationContext.getRealPathFromURI(mUri) ?: ""
|
||||||
|
scanPath(mUri.path) {}
|
||||||
if (path.isNotEmpty()) {
|
if (path.isNotEmpty()) {
|
||||||
sendViewPagerIntent(path)
|
sendViewPagerIntent(path)
|
||||||
finish()
|
finish()
|
||||||
|
|
Loading…
Reference in a new issue