diff --git a/app/src/main/java/io/legado/app/ui/widget/page/TextChapter.kt b/app/src/main/java/io/legado/app/ui/widget/page/TextChapter.kt index bf529acbd..df1643b17 100644 --- a/app/src/main/java/io/legado/app/ui/widget/page/TextChapter.kt +++ b/app/src/main/java/io/legado/app/ui/widget/page/TextChapter.kt @@ -5,11 +5,15 @@ data class TextChapter( val title: String, val pages: List ) { - fun getPage(index: Int): TextPage? { + fun page(index: Int): TextPage? { if (index >= 0 && index < pages.size) { return pages[index] } return null } + + fun pageSize(): Int { + return pages.size + } }