Fix failed download task won't report

This commit is contained in:
FooIbar authored and tarsin committed 2023-02-20 19:21:46 +08:00
1 parent ccd5bd8394
commit 73c9e37eba
1 file changed
+2 -2
@@ -455,7 +455,7 @@ class SpiderQueen private constructor(val galleryInfo: GalleryInfo) : CoroutineS
// Clear
if (state == STATE_DOWNLOADING) {
mPageErrorMap.remove(index)
} else if (state == STATE_FINISHED || state == STATE_FAILED) {
} else if (isStateDone(state)) {
mPagePercentMap.remove(index)
}
@@ -471,7 +471,7 @@ class SpiderQueen private constructor(val galleryInfo: GalleryInfo) : CoroutineS
} else if (state == STATE_FINISHED) {
notifyPageSuccess(index)
}
if (mFinishedPages.get() == size) notifyAllPageDownloaded()
if (mDownloadedPages.get() == size) notifyAllPageDownloaded()
}
@IntDef(MODE_READ, MODE_DOWNLOAD)