manager: fix update tag attached to wrong module after using sort options (fix #473)

This commit is contained in:
rifsxd
2025-06-02 15:34:30 +06:00
parent 582662dce9
commit 3f7e731df6

View File

@@ -594,9 +594,9 @@ private fun ModuleList(
else -> {
items(viewModel.moduleList) { module ->
val scope = rememberCoroutineScope()
val updatedModule by produceState(initialValue = Triple("", "", "")) {
scope.launch(Dispatchers.IO) {
value = viewModel.checkUpdate(module)
val updatedModule by produceState(key1 = module.id, initialValue = Triple("", "", "")) {
value = withContext(Dispatchers.IO) {
viewModel.checkUpdate(module)
}
}