mirror of
https://github.com/aniyomiorg/aniyomi.git
synced 2024-11-28 09:15:12 +03:00
Fix #620
This commit is contained in:
parent
96a39f5c54
commit
faa61923fb
1 changed files with 10 additions and 0 deletions
|
@ -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 a new issue