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

Loading…
Cancel
Save