From 3f7e731df64216826a1cead9909a3e7b6fb7f64b Mon Sep 17 00:00:00 2001 From: rifsxd Date: Mon, 2 Jun 2025 15:34:30 +0600 Subject: [PATCH] manager: fix update tag attached to wrong module after using sort options (fix #473) --- .../src/main/java/com/rifsxd/ksunext/ui/screen/Module.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manager/app/src/main/java/com/rifsxd/ksunext/ui/screen/Module.kt b/manager/app/src/main/java/com/rifsxd/ksunext/ui/screen/Module.kt index aa037e74..25dee55a 100644 --- a/manager/app/src/main/java/com/rifsxd/ksunext/ui/screen/Module.kt +++ b/manager/app/src/main/java/com/rifsxd/ksunext/ui/screen/Module.kt @@ -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) } }