This commit is contained in:
len 2017-01-08 23:40:54 +01:00
parent 96a39f5c54
commit faa61923fb

View file

@ -1,5 +1,6 @@
package eu.kanade.tachiyomi.ui.reader.viewer.pager
import android.support.v4.view.PagerAdapter
import android.view.View
import android.view.ViewGroup
import eu.kanade.tachiyomi.R
@ -34,4 +35,13 @@ class PagerReaderAdapter(private val reader: PagerReader) : ViewPagerAdapter() {
return pages.size
}
override fun getItemPosition(obj: Any): Int {
val view = obj as PageView
return if (view.page in pages) {
PagerAdapter.POSITION_UNCHANGED
} else {
PagerAdapter.POSITION_NONE
}
}
}