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