mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
fix #555, check if file exists at viewpager activity
This commit is contained in:
@ -177,6 +177,13 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||
return
|
||||
}
|
||||
|
||||
val file = File(mPath)
|
||||
if (!file.exists()) {
|
||||
deleteFromMediaStore(file)
|
||||
finish()
|
||||
return
|
||||
}
|
||||
|
||||
if (intent.extras?.containsKey(IS_VIEW_INTENT) == true) {
|
||||
if (isShowHiddenFlagNeeded()) {
|
||||
if (!config.isPasswordProtectionOn) {
|
||||
@ -189,7 +196,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||
|
||||
showSystemUI()
|
||||
|
||||
mDirectory = File(mPath).parent
|
||||
mDirectory = file.parent
|
||||
supportActionBar?.title = mPath.getFilenameFromPath()
|
||||
|
||||
view_pager.onGlobalLayout {
|
||||
|
Reference in New Issue
Block a user