mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
correcting a check at getting current medium at viewpager
This commit is contained in:
@ -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)]
|
||||
|
Reference in New Issue
Block a user