Fix extension actions disappearing after installing and uninstalling in same session (mihonapp/mihon#3049)
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com> (cherry picked from commit 2f9edb551fb2255c11ccd8452a080e87b9c963eb)
This commit is contained in:
parent
19f8fa203d
commit
768c3dcec5
1 changed files with 2 additions and 0 deletions
|
|
@ -26,6 +26,7 @@ import kotlinx.coroutines.flow.launchIn
|
|||
import kotlinx.coroutines.flow.map
|
||||
import kotlinx.coroutines.flow.onCompletion
|
||||
import kotlinx.coroutines.flow.onEach
|
||||
import kotlinx.coroutines.flow.takeWhile
|
||||
import kotlinx.coroutines.flow.update
|
||||
import kotlinx.coroutines.launch
|
||||
import tachiyomi.core.common.util.lang.launchIO
|
||||
|
|
@ -228,6 +229,7 @@ class ExtensionsScreenModel(
|
|||
private suspend fun Flow<InstallStep>.collectToInstallUpdate(extension: Extension) =
|
||||
this
|
||||
.onEach { installStep -> addDownloadState(extension, installStep) }
|
||||
.takeWhile { installStep -> installStep != InstallStep.Installed }
|
||||
.onCompletion { removeDownloadState(extension) }
|
||||
.collect()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue