pull/34/head
kunfei 5 years ago
parent 7cba4b5152
commit 0c0d81c14b
  1. 2
      app/src/main/java/io/legado/app/ui/widget/page/PageView.kt
  2. 9
      app/src/main/java/io/legado/app/ui/widget/page/TextPageFactory.kt

@ -35,7 +35,7 @@ class PageView(context: Context, attrs: AttributeSet) :
addView(curPage) addView(curPage)
upBg() upBg()
setWillNotDraw(false) setWillNotDraw(false)
pageFactory = TextPageFactory.create(this) pageFactory = TextPageFactory(this)
upPageAnim() upPageAnim()
curPage?.callBack = this curPage?.callBack = this
} }

@ -1,13 +1,6 @@
package io.legado.app.ui.widget.page package io.legado.app.ui.widget.page
class TextPageFactory private constructor(dataSource: DataSource) : class TextPageFactory(dataSource: DataSource) : PageFactory<TextPage>(dataSource) {
PageFactory<TextPage>(dataSource) {
companion object {
fun create(dataSource: DataSource): TextPageFactory {
return TextPageFactory(dataSource)
}
}
override fun hasPrev(): Boolean = with(dataSource) { override fun hasPrev(): Boolean = with(dataSource) {
return if (isScrollDelegate()) { return if (isScrollDelegate()) {

Loading…
Cancel
Save