do not refresh media at viewpager with random sorting

This commit is contained in:
tibbi 2018-10-25 10:53:24 +02:00
parent 0a6c553cc7
commit f773ab9c1c

View file

@ -982,9 +982,11 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
}
private fun refreshViewPager() {
GetMediaAsynctask(applicationContext, mDirectory, false, false, mShowAll) {
gotMedia(it)
}.execute()
if (config.getFileSorting(mDirectory) and SORT_BY_RANDOM == 0) {
GetMediaAsynctask(applicationContext, mDirectory, false, false, mShowAll) {
gotMedia(it)
}.execute()
}
}
private fun gotMedia(thumbnailItems: ArrayList<ThumbnailItem>) {