Explicitly init DownloadManager on app startup

This commit is contained in:
tarsin committed 2023-02-21 23:00:26 +08:00
1 parent 5c6716bd98
commit 755a15d5e5
2 files changed
+2 -4

No files matched your search

@@ -95,7 +95,7 @@ class EhApplication : Application(), DefaultLifecycleObserver, ImageLoaderFactor
ehDatabase
}
launchIO {
DownloadManager
DownloadManager.isIdle
}
launchIO {
cleanupDownload()
@@ -39,8 +39,6 @@ import kotlinx.coroutines.launch
import java.util.LinkedList
object DownloadManager : OnSpiderListener {
private val downloadManager = this
// All download info list
private val mAllInfoList: LinkedList<DownloadInfo>
@@ -1080,7 +1078,7 @@ object DownloadManager : OnSpiderListener {
mCurrentSpider = null
// Release spider
if (spider != null) {
spider.removeOnSpiderListener(downloadManager)
spider.removeOnSpiderListener(DownloadManager)
SpiderQueen.releaseSpiderQueen(spider, SpiderQueen.MODE_DOWNLOAD)
}
// Check null