mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-22 20:48:00 +01:00
Enable refreshing for external intents even when video is playing
This commit is contained in:
parent
bccf86a1bf
commit
be3ee0de8d
1 changed files with 7 additions and 3 deletions
|
@ -1229,8 +1229,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
|
|
||||||
private fun refreshViewPager(refetchPosition: Boolean = false) {
|
private fun refreshViewPager(refetchPosition: Boolean = false) {
|
||||||
val isSortingRandom = config.getFolderSorting(mDirectory) and SORT_BY_RANDOM == 0
|
val isSortingRandom = config.getFolderSorting(mDirectory) and SORT_BY_RANDOM == 0
|
||||||
val isExternalIntent = !intent.getBooleanExtra(IS_FROM_GALLERY, false)
|
if (!isSortingRandom || isExternalIntent()) {
|
||||||
if (!isSortingRandom || isExternalIntent) {
|
|
||||||
GetMediaAsynctask(applicationContext, mDirectory, isPickImage = false, isPickVideo = false, showAll = mShowAll) {
|
GetMediaAsynctask(applicationContext, mDirectory, isPickImage = false, isPickVideo = false, showAll = mShowAll) {
|
||||||
gotMedia(it, refetchViewPagerPosition = refetchPosition)
|
gotMedia(it, refetchViewPagerPosition = refetchPosition)
|
||||||
}.execute()
|
}.execute()
|
||||||
|
@ -1246,7 +1245,8 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ignorePlayingVideos && (getCurrentFragment() as? VideoFragment)?.mIsPlaying == true) {
|
val isPlaying = (getCurrentFragment() as? VideoFragment)?.mIsPlaying == true
|
||||||
|
if (!ignorePlayingVideos && isPlaying && !isExternalIntent()) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1438,4 +1438,8 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
checkOrientation()
|
checkOrientation()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun isExternalIntent(): Boolean {
|
||||||
|
return !intent.getBooleanExtra(IS_FROM_GALLERY, false)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue