feat: 优化

pull/274/head
gedoor 4 years ago
parent 9798f24cc1
commit 75c8bd3388
  1. 3
      app/src/main/java/io/legado/app/service/DownloadService.kt

@ -151,7 +151,6 @@ class DownloadService : BaseService() {
private fun download() { private fun download() {
downloadingCount += 1 downloadingCount += 1
Download.addLog("downloadingCount++")
tasks.add(Coroutine.async(this, context = searchPool) { tasks.add(Coroutine.async(this, context = searchPool) {
if (!isActive) return@async if (!isActive) return@async
val bookChapter: BookChapter? = synchronized(this@DownloadService) { val bookChapter: BookChapter? = synchronized(this@DownloadService) {
@ -228,8 +227,6 @@ class DownloadService : BaseService() {
private fun postDownloading(hasChapter: Boolean) { private fun postDownloading(hasChapter: Boolean) {
downloadingCount -= 1 downloadingCount -= 1
Download.addLog("downloadingCount--")
Download.addLog("downloadingCount $downloadingCount")
if (hasChapter) { if (hasChapter) {
download() download()
} else { } else {

Loading…
Cancel
Save