mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-02-17 12:30:36 +01:00
correcting a check at getting current medium at viewpager
This commit is contained in:
parent
e98de74ae4
commit
6dc1323252
@ -509,7 +509,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun getCurrentMedium(): Medium? {
|
private fun getCurrentMedium(): Medium? {
|
||||||
return if (mMedia.isEmpty() || mPos >= mMedia.size)
|
return if (mMedia.isEmpty() || mPos == -1)
|
||||||
null
|
null
|
||||||
else
|
else
|
||||||
mMedia[Math.min(mPos, mMedia.size - 1)]
|
mMedia[Math.min(mPos, mMedia.size - 1)]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user