mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 14:37:59 +01:00
correcting a check at getting current medium at viewpager
This commit is contained in:
parent
e98de74ae4
commit
6dc1323252
1 changed files with 1 additions and 1 deletions
|
@ -509,7 +509,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
}
|
||||
|
||||
private fun getCurrentMedium(): Medium? {
|
||||
return if (mMedia.isEmpty() || mPos >= mMedia.size)
|
||||
return if (mMedia.isEmpty() || mPos == -1)
|
||||
null
|
||||
else
|
||||
mMedia[Math.min(mPos, mMedia.size - 1)]
|
||||
|
|
Loading…
Reference in a new issue