pull/2102/head
kunfei 2 years ago
parent 13d0adc1b1
commit 3c56acbd96
  1. 2
      app/src/main/java/io/legado/app/model/CacheBook.kt
  2. 1
      app/src/main/java/io/legado/app/service/CacheBookService.kt

@ -161,6 +161,7 @@ object CacheBook {
fun stop() {
waitDownloadSet.clear()
isStopped = true
postEvent(EventBus.UP_DOWNLOAD, book.bookUrl)
}
@Synchronized
@ -171,6 +172,7 @@ object CacheBook {
waitDownloadSet.add(i)
}
}
postEvent(EventBus.UP_DOWNLOAD, book.bookUrl)
}
@Synchronized

@ -85,7 +85,6 @@ class CacheBookService : BaseService() {
execute {
val cacheBook = CacheBook.getOrCreate(bookUrl) ?: return@execute
cacheBook.addDownload(start, end)
postEvent(EventBus.UP_DOWNLOAD, "")
upNotification(CacheBook.downloadSummary)
if (downloadJob == null) {
download()

Loading…
Cancel
Save