From faa61923fbc690eb39f4f9c4799a4c7a24e32888 Mon Sep 17 00:00:00 2001 From: len Date: Sun, 8 Jan 2017 23:40:54 +0100 Subject: [PATCH] Fix #620 --- .../ui/reader/viewer/pager/PagerReaderAdapter.kt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerReaderAdapter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerReaderAdapter.kt index 48f13e1528..7f765207cc 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerReaderAdapter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerReaderAdapter.kt @@ -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 + } + } + }