From c437f1473cfe2cadab70b240f8ac841131caf38d Mon Sep 17 00:00:00 2001 From: len Date: Wed, 8 Mar 2017 18:56:27 +0100 Subject: [PATCH] Add dev flavor. Bugfix in reader --- app/build.gradle | 7 +++++-- .../kanade/tachiyomi/ui/reader/viewer/pager/PagerReader.kt | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 807fa589e..a45af1ec2 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -44,6 +44,7 @@ android { buildConfigField "String", "COMMIT_COUNT", "\"${getCommitCount()}\"" buildConfigField "String", "COMMIT_SHA", "\"${getGitSha()}\"" buildConfigField "String", "BUILD_TIME", "\"${getBuildTime()}\"" + buildConfigField "boolean", "INCLUDE_UPDATER", "false" vectorDrawables.useSupportLibrary = true @@ -70,9 +71,11 @@ android { standard { buildConfigField "boolean", "INCLUDE_UPDATER", "true" } - fdroid { - buildConfigField "boolean", "INCLUDE_UPDATER", "false" + } + dev { + minSdkVersion 21 + resConfigs "en", "xxhdpi" } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerReader.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerReader.kt index d3c1f4589..ab12c872a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerReader.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerReader.kt @@ -230,7 +230,10 @@ abstract class PagerReader : BaseReader() { */ protected fun setPagesOnAdapter() { if (pages.isNotEmpty()) { + // Prevent a wrong active page when changing chapters with the navigation buttons. + val currPage = currentPage adapter.pages = pages + currentPage = currPage if (currentPage == pager.currentItem) { onPageChanged(currentPage) } else {