mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 22:47:59 +01:00
refetch viewpager item position if it is -1 too
This commit is contained in:
parent
61440e2f22
commit
360c3529ea
1 changed files with 1 additions and 1 deletions
|
@ -1192,7 +1192,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
mPrevHashcode = media.hashCode()
|
mPrevHashcode = media.hashCode()
|
||||||
mMediaFiles = media
|
mMediaFiles = media
|
||||||
|
|
||||||
if (refetchViewPagerPosition) {
|
if (refetchViewPagerPosition || mPos == -1) {
|
||||||
mPos = getPositionInList(media)
|
mPos = getPositionInList(media)
|
||||||
if (mPos == -1) {
|
if (mPos == -1) {
|
||||||
Math.min(mPos, mMediaFiles.size - 1)
|
Math.min(mPos, mMediaFiles.size - 1)
|
||||||
|
|
Loading…
Reference in a new issue