pull/32/head
kunfei 5 years ago
parent 61cfd284b7
commit 9b93cfade5
  1. 6
      app/src/main/java/io/legado/app/ui/readbook/ReadBookViewModel.kt

@ -167,7 +167,13 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) {
App.db.bookChapterDao().getChapter(book.bookUrl, index)?.let { chapter -> App.db.bookChapterDao().getChapter(book.bookUrl, index)?.let { chapter ->
if (!BookHelp.hasContent(book, chapter)) { if (!BookHelp.hasContent(book, chapter)) {
download(book, chapter) download(book, chapter)
} else {
synchronized(loadingLock) {
loadingChapters.remove(index)
}
} }
} ?: synchronized(loadingLock) {
loadingChapters.remove(index)
} }
}.onError { }.onError {
synchronized(loadingLock) { synchronized(loadingLock) {

Loading…
Cancel
Save