From 0c0d81c14b9b9b75ef03c2235e2255e4aea060bd Mon Sep 17 00:00:00 2001 From: kunfei Date: Sun, 22 Sep 2019 19:09:47 +0800 Subject: [PATCH] up --- .../main/java/io/legado/app/ui/widget/page/PageView.kt | 2 +- .../java/io/legado/app/ui/widget/page/TextPageFactory.kt | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) 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()) {