mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-29 07:57:59 +01:00
Enable random sorting for external intents
This commit is contained in:
parent
5fba1ad810
commit
bccf86a1bf
1 changed files with 3 additions and 1 deletions
|
@ -1228,7 +1228,9 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
}
|
||||
|
||||
private fun refreshViewPager(refetchPosition: Boolean = false) {
|
||||
if (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) {
|
||||
GetMediaAsynctask(applicationContext, mDirectory, isPickImage = false, isPickVideo = false, showAll = mShowAll) {
|
||||
gotMedia(it, refetchViewPagerPosition = refetchPosition)
|
||||
}.execute()
|
||||
|
|
Loading…
Reference in a new issue