From d42e687ba322a47e93131b4a9619a25b23769e36 Mon Sep 17 00:00:00 2001 From: kunfei Date: Mon, 3 Feb 2020 11:19:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/help/AppConfig.kt | 2 ++ .../legado/app/ui/book/read/page/delegate/PageDelegate.kt | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/io/legado/app/help/AppConfig.kt b/app/src/main/java/io/legado/app/help/AppConfig.kt index 31107ad5f..002fee5ff 100644 --- a/app/src/main/java/io/legado/app/help/AppConfig.kt +++ b/app/src/main/java/io/legado/app/help/AppConfig.kt @@ -52,4 +52,6 @@ object AppConfig { val isEInkMode: Boolean get() = App.INSTANCE.getPrefBoolean("isEInkMode") + + val clickAllNext: Boolean get() = App.INSTANCE.getPrefBoolean(PreferKey.clickAllNext, false) } diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/delegate/PageDelegate.kt b/app/src/main/java/io/legado/app/ui/book/read/page/delegate/PageDelegate.kt index e5ccf1b65..e4cbf9560 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/delegate/PageDelegate.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/delegate/PageDelegate.kt @@ -9,10 +9,9 @@ import android.widget.Scroller import androidx.annotation.CallSuper import androidx.interpolator.view.animation.FastOutLinearInInterpolator import com.google.android.material.snackbar.Snackbar -import io.legado.app.constant.PreferKey +import io.legado.app.help.AppConfig import io.legado.app.ui.book.read.page.ContentView import io.legado.app.ui.book.read.page.PageView -import io.legado.app.utils.getPrefBoolean import io.legado.app.utils.screenshot import io.legado.app.utils.snackbar import kotlin.math.abs @@ -256,7 +255,8 @@ abstract class PageDelegate(protected val pageView: PageView) { setTouchPoint(x, y) } else { bitmap = if (x > viewWidth / 2 || - pageView.context.getPrefBoolean(PreferKey.clickAllNext, false)) { + AppConfig.clickAllNext + ) { //设置动画方向 if (!hasNext()) { return true