diff --git a/app/src/main/java/io/legado/app/ui/widget/page/DataSource.kt b/app/src/main/java/io/legado/app/ui/widget/page/DataSource.kt index e10a48d8a..d7efe18a5 100644 --- a/app/src/main/java/io/legado/app/ui/widget/page/DataSource.kt +++ b/app/src/main/java/io/legado/app/ui/widget/page/DataSource.kt @@ -9,8 +9,6 @@ interface DataSource { fun getChapterPosition(): Int - fun getChapter(position: Int): TextChapter? - fun getCurrentChapter(): TextChapter? fun getNextChapter(): TextChapter? diff --git a/app/src/main/java/io/legado/app/ui/widget/page/PageFactory.kt b/app/src/main/java/io/legado/app/ui/widget/page/PageFactory.kt index f9b9ca4cb..72eaa5eda 100644 --- a/app/src/main/java/io/legado/app/ui/widget/page/PageFactory.kt +++ b/app/src/main/java/io/legado/app/ui/widget/page/PageFactory.kt @@ -2,8 +2,6 @@ package io.legado.app.ui.widget.page abstract class PageFactory(protected val dataSource: DataSource) { - abstract fun pageAt(index: Int): DATA? - abstract fun moveToFirst() abstract fun moveToLast() 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 ec4693ffb..759ee2c46 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 @@ -190,10 +190,6 @@ class PageView(context: Context, attrs: AttributeSet) : return ReadBook.durChapterIndex } - override fun getChapter(position: Int): TextChapter? { - return ReadBook.textChapter(position) - } - override fun getCurrentChapter(): TextChapter? { return ReadBook.textChapter(0) } 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 d25acb1ef..d5aaa68d7 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 @@ -21,11 +21,6 @@ class TextPageFactory(dataSource: DataSource) : PageFactory(dataSource } } - override fun pageAt(index: Int): TextPage { - return dataSource.getCurrentChapter()?.page(index) - ?: TextPage(index = index, title = "index:$index") - } - override fun moveToFirst() { dataSource.setPageIndex(0) }