diff --git a/app/src/main/java/io/legado/app/ui/widget/page/PageView.kt b/app/src/main/java/io/legado/app/ui/widget/page/PageView.kt index 114417973..474f74887 100644 --- a/app/src/main/java/io/legado/app/ui/widget/page/PageView.kt +++ b/app/src/main/java/io/legado/app/ui/widget/page/PageView.kt @@ -35,7 +35,7 @@ class PageView(context: Context, attrs: AttributeSet) : addView(curPage) upBg() setWillNotDraw(false) - pageFactory = TextPageFactory.create(this) + pageFactory = TextPageFactory(this) upPageAnim() curPage?.callBack = this } diff --git a/app/src/main/java/io/legado/app/ui/widget/page/TextPageFactory.kt b/app/src/main/java/io/legado/app/ui/widget/page/TextPageFactory.kt index aa8c1fcca..cfadbf7aa 100644 --- a/app/src/main/java/io/legado/app/ui/widget/page/TextPageFactory.kt +++ b/app/src/main/java/io/legado/app/ui/widget/page/TextPageFactory.kt @@ -1,13 +1,6 @@ package io.legado.app.ui.widget.page -class TextPageFactory private constructor(dataSource: DataSource) : - PageFactory(dataSource) { - - companion object { - fun create(dataSource: DataSource): TextPageFactory { - return TextPageFactory(dataSource) - } - } +class TextPageFactory(dataSource: DataSource) : PageFactory(dataSource) { override fun hasPrev(): Boolean = with(dataSource) { return if (isScrollDelegate()) {