feat: 优化代码

pull/106/head
kunfei 5 years ago
parent 10d0847e1e
commit 03152904c5
  1. 3
      app/src/main/java/io/legado/app/ui/book/read/page/ChapterProvider.kt
  2. 2
      app/src/main/java/io/legado/app/ui/book/read/page/ContentTextView.kt

@ -78,8 +78,7 @@ object ChapterProvider {
fun getTextChapter( fun getTextChapter(
bookChapter: BookChapter, bookChapter: BookChapter,
content: String, content: String,
chapterSize: Int, chapterSize: Int
isHtml: Boolean = false
): TextChapter { ): TextChapter {
val textPages = arrayListOf<TextPage>() val textPages = arrayListOf<TextPage>()
val pageLines = arrayListOf<Int>() val pageLines = arrayListOf<Int>()

@ -26,7 +26,7 @@ class ContentTextView(context: Context, attrs: AttributeSet?) : View(context, at
style = Paint.Style.FILL style = Paint.Style.FILL
} }
} }
var textPage: TextPage? = null private var textPage: TextPage? = null
fun setContent(textPage: TextPage?) { fun setContent(textPage: TextPage?) {
this.textPage = textPage this.textPage = textPage

Loading…
Cancel
Save