Emit update to clients after adding all mangas to the queue (#521)
Emitting updates before all the mangas were added to the queue could lead to e.g. wrong progress calculation.
This commit is contained in:
@@ -13,8 +13,8 @@ class TestUpdater : IUpdater {
|
||||
private val _status = MutableStateFlow(UpdateStatus())
|
||||
override val status: StateFlow<UpdateStatus> = _status.asStateFlow()
|
||||
|
||||
override fun addMangaToQueue(manga: MangaDataClass) {
|
||||
updateQueue.add(UpdateJob(manga))
|
||||
override fun addMangasToQueue(mangas: List<MangaDataClass>) {
|
||||
mangas.forEach { updateQueue.add(UpdateJob(it)) }
|
||||
isRunning = true
|
||||
updateStatus()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user