|
@@ -1,5 +1,6 @@
|
|
package eu.kanade.tachiyomi.ui.reader.viewer.pager
|
|
package eu.kanade.tachiyomi.ui.reader.viewer.pager
|
|
|
|
|
|
|
|
+import android.support.v4.view.PagerAdapter
|
|
import android.view.View
|
|
import android.view.View
|
|
import android.view.ViewGroup
|
|
import android.view.ViewGroup
|
|
import eu.kanade.tachiyomi.R
|
|
import eu.kanade.tachiyomi.R
|
|
@@ -34,4 +35,13 @@ class PagerReaderAdapter(private val reader: PagerReader) : ViewPagerAdapter() {
|
|
return pages.size
|
|
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
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|