From 63641f47d911080f1a618d7f4bf0fde65cce35cb Mon Sep 17 00:00:00 2001 From: kunfei Date: Sat, 17 Aug 2019 14:59:45 +0800 Subject: [PATCH] up --- .../main/java/io/legado/app/ui/widget/page/TextChapter.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 + } }