mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-23 03:51:52 +01:00
Fix #620
This commit is contained in:
parent
96a39f5c54
commit
faa61923fb
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user