Fix extension actions disappearing after installing and uninstalling in same session (#3049)

Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
# Conflicts:
#	CHANGELOG.md
This commit is contained in:
Leodyver Semilla
2026-03-19 18:48:16 +08:00
committed by Jobobby04
parent 7a398dabba
commit 1c8e6dcd6f
@@ -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
@@ -180,6 +181,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()