修复自动换源的bug

pull/370/head
gedoor 4 years ago
parent 5c14b044eb
commit f8b309d6ef
  1. 2
      app/src/main/java/io/legado/app/ui/book/read/ReadBookViewModel.kt

@ -46,11 +46,11 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) {
private fun initBook(book: Book) {
if (ReadBook.book?.bookUrl != book.bookUrl) {
ReadBook.resetData(book)
isInitFinish = true
if (!book.isLocalBook() && ReadBook.webBook == null) {
autoChangeSource(book.name, book.author)
return
}
isInitFinish = true
ReadBook.chapterSize = App.db.bookChapterDao().getChapterCount(book.bookUrl)
if (ReadBook.chapterSize == 0) {
if (book.tocUrl.isEmpty()) {

Loading…
Cancel
Save