feat: 优化代码

pull/182/head
kunfei 5 years ago
parent 92b45bde48
commit 7f2a24b53b
  1. 5
      app/src/main/java/io/legado/app/ui/book/chapterlist/ChapterListFragment.kt

@ -1,5 +1,6 @@
package io.legado.app.ui.book.chapterlist package io.legado.app.ui.book.chapterlist
import android.annotation.SuppressLint
import android.app.Activity.RESULT_OK import android.app.Activity.RESULT_OK
import android.content.Intent import android.content.Intent
import android.os.Bundle import android.os.Bundle
@ -66,6 +67,7 @@ class ChapterListFragment : VMBaseFragment<ChapterListViewModel>(R.layout.fragme
} }
} }
@SuppressLint("SetTextI18n")
private fun initBook() { private fun initBook() {
launch { launch {
withContext(IO) { withContext(IO) {
@ -74,7 +76,8 @@ class ChapterListFragment : VMBaseFragment<ChapterListViewModel>(R.layout.fragme
initDoc() initDoc()
book?.let { book?.let {
durChapterIndex = it.durChapterIndex durChapterIndex = it.durChapterIndex
tv_current_chapter_info.text = it.durChapterTitle tv_current_chapter_info.text =
"${it.durChapterTitle}(${it.durChapterPos}/${it.totalChapterNum})"
initCacheFileNames(it) initCacheFileNames(it)
} }
} }

Loading…
Cancel
Save