pull/32/head
kunfei 5 years ago
parent 9af3c5afbd
commit e97b2630ce
  1. 12
      app/src/main/java/io/legado/app/ui/readbook/ReadBookViewModel.kt

@ -80,6 +80,10 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) {
} }
} ?: download(book, chapter) } ?: download(book, chapter)
} }
}.onError {
synchronized(loadingLock) {
loadingChapters.remove(index)
}
} }
} }
@ -94,6 +98,10 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) {
download(book, chapter) download(book, chapter)
} }
} }
}.onError {
synchronized(loadingLock) {
loadingChapters.remove(index)
}
} }
} }
@ -107,6 +115,10 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) {
loadingChapters.remove(chapter.index) loadingChapters.remove(chapter.index)
} }
} }
}?.onError {
synchronized(loadingLock) {
loadingChapters.remove(chapter.index)
}
} }
} }

Loading…
Cancel
Save