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 ed438c1dd..05a180006 100644 --- a/app/src/main/java/io/legado/app/help/AppConfig.kt +++ b/app/src/main/java/io/legado/app/help/AppConfig.kt @@ -10,9 +10,8 @@ import io.legado.app.utils.* @Suppress("MemberVisibilityCanBePrivate") object AppConfig { var isEInkMode: Boolean = false - var clickAllNext: Boolean = false - var isGooglePlay: Boolean - var isCoolApk: Boolean + val isGooglePlay: Boolean + val isCoolApk: Boolean var replaceEnableDefault: Boolean = true val sysElevation = App.INSTANCE.resources.getDimension(R.dimen.design_appbar_elevation).toInt() @@ -24,7 +23,6 @@ object AppConfig { fun upConfig() { upEInkMode() - upClickAllNext() upReplaceEnableDefault() } @@ -103,10 +101,6 @@ object AppConfig { App.INSTANCE.putPrefInt(PreferKey.ttsSpeechRate, value) } - fun upClickAllNext() { - clickAllNext = App.INSTANCE.getPrefBoolean(PreferKey.clickAllNext, false) - } - var chineseConverterType: Int get() = App.INSTANCE.getPrefInt(PreferKey.chineseConverterType) set(value) { diff --git a/app/src/main/java/io/legado/app/help/ReadBookConfig.kt b/app/src/main/java/io/legado/app/help/ReadBookConfig.kt index b73a353d3..18b865f5a 100644 --- a/app/src/main/java/io/legado/app/help/ReadBookConfig.kt +++ b/app/src/main/java/io/legado/app/help/ReadBookConfig.kt @@ -154,6 +154,7 @@ object ReadBookConfig { } } val clickTurnPage get() = App.INSTANCE.getPrefBoolean(PreferKey.clickTurnPage, true) + val clickAllNext get() = App.INSTANCE.getPrefBoolean(PreferKey.clickAllNext, false) val textFullJustify get() = App.INSTANCE.getPrefBoolean(PreferKey.textFullJustify, true) val textBottomJustify get() = App.INSTANCE.getPrefBoolean(PreferKey.textBottomJustify, true) var hideStatusBar = App.INSTANCE.getPrefBoolean(PreferKey.hideStatusBar) diff --git a/app/src/main/java/io/legado/app/ui/book/read/config/MoreConfigDialog.kt b/app/src/main/java/io/legado/app/ui/book/read/config/MoreConfigDialog.kt index 4e2c82230..4a3b4bd23 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/config/MoreConfigDialog.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/config/MoreConfigDialog.kt @@ -12,7 +12,6 @@ import io.legado.app.R import io.legado.app.base.BasePreferenceFragment import io.legado.app.constant.EventBus import io.legado.app.constant.PreferKey -import io.legado.app.help.AppConfig import io.legado.app.help.ReadBookConfig import io.legado.app.lib.theme.ATH import io.legado.app.lib.theme.bottomBackground @@ -118,9 +117,6 @@ class MoreConfigDialog : DialogFragment() { PreferKey.showBrightnessView -> { postEvent(PreferKey.showBrightnessView, "") } - PreferKey.clickAllNext -> { - AppConfig.upClickAllNext() - } } } diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/PageView.kt b/app/src/main/java/io/legado/app/ui/book/read/page/PageView.kt index 4b12e71f6..b502e20cd 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/PageView.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/PageView.kt @@ -10,7 +10,6 @@ import android.util.AttributeSet import android.view.MotionEvent import android.view.ViewConfiguration import android.widget.FrameLayout -import io.legado.app.help.AppConfig import io.legado.app.help.ReadBookConfig import io.legado.app.lib.theme.accentColor import io.legado.app.service.help.ReadBook @@ -249,7 +248,7 @@ class PageView(context: Context, attrs: AttributeSet) : callBack.clickCenter() } } else if (ReadBookConfig.clickTurnPage) { - if (startX > width / 2 || AppConfig.clickAllNext) { + if (startX > width / 2 || ReadBookConfig.clickAllNext) { pageDelegate?.nextPageByAnim(defaultAnimationSpeed) } else { pageDelegate?.prevPageByAnim(defaultAnimationSpeed) diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/delegate/HorizontalPageDelegate.kt b/app/src/main/java/io/legado/app/ui/book/read/page/delegate/HorizontalPageDelegate.kt index a224edd5b..356d7669c 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/delegate/HorizontalPageDelegate.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/delegate/HorizontalPageDelegate.kt @@ -118,7 +118,7 @@ abstract class HorizontalPageDelegate(pageView: PageView) : PageDelegate(pageVie abortAnim() if (!hasNext()) return setDirection(Direction.NEXT) - pageView.setTouchPoint(viewWidth.toFloat(), 0f) + pageView.setTouchPoint(viewWidth.toFloat(), 0f, false) onAnimStart(animationSpeed) }