Inline DownloadQueue into Downloader (#9159)

* Move statusFlow and progressFlow to DownloadManager

* Inline DownloadQueue into Downloader

* Move reorderQueue implementation to Downloader
This commit is contained in:
Two-Ai
2023-02-28 22:13:13 -05:00
committed by GitHub
parent f03a834136
commit b41565f879
7 changed files with 134 additions and 151 deletions
@@ -111,7 +111,7 @@ class DownloadQueueScreenModel(
init {
coroutineScope.launch {
downloadManager.queue.state
downloadManager.queueState
.map { downloads ->
downloads
.groupBy { it.source }
@@ -136,8 +136,8 @@ class DownloadQueueScreenModel(
val isDownloaderRunning
get() = downloadManager.isDownloaderRunning
fun getDownloadStatusFlow() = downloadManager.queue.statusFlow()
fun getDownloadProgressFlow() = downloadManager.queue.progressFlow()
fun getDownloadStatusFlow() = downloadManager.statusFlow()
fun getDownloadProgressFlow() = downloadManager.progressFlow()
fun startDownloads() {
downloadManager.startDownloads()