Remove usage of PublishRelay in DownloadQueue
This commit is contained in:
@@ -34,7 +34,7 @@ class DownloadPresenter : BasePresenter<DownloadController>() {
|
||||
super.onCreate(savedState)
|
||||
|
||||
presenterScope.launch {
|
||||
downloadQueue.updatedFlow()
|
||||
downloadQueue.updates
|
||||
.catch { logcat(LogPriority.ERROR, it) }
|
||||
.map { downloads ->
|
||||
downloads
|
||||
|
||||
@@ -69,7 +69,7 @@ private class MoreScreenModel(
|
||||
coroutineScope.launchIO {
|
||||
combine(
|
||||
DownloadService.isRunning,
|
||||
downloadManager.queue.updatedFlow(),
|
||||
downloadManager.queue.updates,
|
||||
) { isRunning, downloadQueue -> Pair(isRunning, downloadQueue.size) }
|
||||
.collectLatest { (isDownloading, downloadQueueSize) ->
|
||||
val pendingDownloadExists = downloadQueueSize != 0
|
||||
|
||||
Reference in New Issue
Block a user