添加单章换源

pull/1649/head
kunfei 3 years ago
parent fae20c6a90
commit 4347ff7c78
  1. 12
      app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt

@ -244,11 +244,15 @@ class ReadBookActivity : BaseReadBookActivity(),
showDialogFragment(ChangeBookSourceDialog(it.name, it.author))
}
}
R.id.menu_chapter_change_source -> {
R.id.menu_chapter_change_source -> launch {
val book = ReadBook.book ?: return@launch
val chapter =
appDb.bookChapterDao.getChapter(book.bookUrl, ReadBook.durChapterIndex)
?: return@launch
binding.readMenu.runMenuOut()
ReadBook.book?.let {
showDialogFragment(ChangeChapterSourceDialog(it.name, it.author))
}
showDialogFragment(
ChangeChapterSourceDialog(book.name, book.author, chapter.index, chapter.title)
)
}
R.id.menu_refresh_dur -> {
if (ReadBook.bookSource == null) {

Loading…
Cancel
Save