添加单章换源

This commit is contained in:
kunfei
2022-02-21 21:02:31 +08:00
parent fae20c6a90
commit 4347ff7c78

View File

@@ -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) {