pull/32/head
kunfei 5 years ago
parent d2818eead7
commit d766fc20bc
  1. 4
      app/src/main/java/io/legado/app/ui/widget/page/ChapterProvider.kt

@ -24,10 +24,12 @@ object ChapterProvider {
while (surplusText.isNotEmpty()) { while (surplusText.isNotEmpty()) {
val spannableStringBuilder = SpannableStringBuilder(surplusText) val spannableStringBuilder = SpannableStringBuilder(surplusText)
if (pageIndex == 0) { if (pageIndex == 0) {
var end = surplusText.indexOf("\n")
if (end == -1) end = surplusText.length.minus(1)
spannableStringBuilder.setSpan( spannableStringBuilder.setSpan(
titleSpan, titleSpan,
0, 0,
surplusText.indexOf("\n"), end,
Spannable.SPAN_INCLUSIVE_EXCLUSIVE Spannable.SPAN_INCLUSIVE_EXCLUSIVE
) )
} }

Loading…
Cancel
Save