do not refresh media at viewpager with random sorting
This commit is contained in:
parent
0a6c553cc7
commit
f773ab9c1c
1 changed files with 5 additions and 3 deletions
|
@ -982,10 +982,12 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun refreshViewPager() {
|
private fun refreshViewPager() {
|
||||||
|
if (config.getFileSorting(mDirectory) and SORT_BY_RANDOM == 0) {
|
||||||
GetMediaAsynctask(applicationContext, mDirectory, false, false, mShowAll) {
|
GetMediaAsynctask(applicationContext, mDirectory, false, false, mShowAll) {
|
||||||
gotMedia(it)
|
gotMedia(it)
|
||||||
}.execute()
|
}.execute()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun gotMedia(thumbnailItems: ArrayList<ThumbnailItem>) {
|
private fun gotMedia(thumbnailItems: ArrayList<ThumbnailItem>) {
|
||||||
val media = thumbnailItems.filter { it is Medium }.map { it as Medium } as ArrayList<Medium>
|
val media = thumbnailItems.filter { it is Medium }.map { it as Medium } as ArrayList<Medium>
|
||||||
|
|
Loading…
Reference in a new issue