mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-10 11:08:56 +01:00
DownloadController: Fix first active download status not updating (#8069)
This commit is contained in:
@@ -90,19 +90,6 @@ class DownloadController :
|
||||
|
||||
override fun createPresenter() = DownloadPresenter()
|
||||
|
||||
override fun onViewCreated(view: View) {
|
||||
super.onViewCreated(view)
|
||||
|
||||
viewScope.launchUI {
|
||||
presenter.getDownloadStatusFlow()
|
||||
.collect(this@DownloadController::onStatusChange)
|
||||
}
|
||||
viewScope.launchUI {
|
||||
presenter.getDownloadProgressFlow()
|
||||
.collect(this@DownloadController::onUpdateDownloadedPages)
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
override fun ComposeContent() {
|
||||
val context = LocalContext.current
|
||||
@@ -291,6 +278,15 @@ class DownloadController :
|
||||
|
||||
ViewCompat.setNestedScrollingEnabled(controllerBinding.root, true)
|
||||
|
||||
viewScope.launchUI {
|
||||
presenter.getDownloadStatusFlow()
|
||||
.collect(this@DownloadController::onStatusChange)
|
||||
}
|
||||
viewScope.launchUI {
|
||||
presenter.getDownloadProgressFlow()
|
||||
.collect(this@DownloadController::onUpdateDownloadedPages)
|
||||
}
|
||||
|
||||
controllerBinding.root
|
||||
},
|
||||
update = {
|
||||
|
||||
Reference in New Issue
Block a user