manager: Fix not refreshing after action button was pressed (#2201)

- This commit fix issue #2171


Tested-by: backslashxx <118538522+backslashxx@users.noreply.github.com>

---------

Signed-off-by: rsuntk <rissu.ntk@gmail.com>
This commit is contained in:
Rissu
2024-11-11 18:11:34 +07:00
committed by GitHub
parent b7b704ede7
commit 0f81c41537
2 changed files with 6 additions and 2 deletions

View File

@@ -140,4 +140,4 @@ private fun TopBar(onBack: () -> Unit = {}, onSave: () -> Unit = {}) {
} }
} }
) )
} }

View File

@@ -477,6 +477,7 @@ fun ModuleItem(
val textDecoration = if (!module.remove) null else TextDecoration.LineThrough val textDecoration = if (!module.remove) null else TextDecoration.LineThrough
val interactionSource = remember { MutableInteractionSource() } val interactionSource = remember { MutableInteractionSource() }
val indication = LocalIndication.current val indication = LocalIndication.current
val viewModel = viewModel<ModuleViewModel>()
Column( Column(
modifier = Modifier modifier = Modifier
@@ -580,7 +581,10 @@ fun ModuleItem(
if (module.hasActionScript) { if (module.hasActionScript) {
FilledTonalButton( FilledTonalButton(
modifier = Modifier.defaultMinSize(52.dp, 32.dp), modifier = Modifier.defaultMinSize(52.dp, 32.dp),
onClick = { navigator.navigate(ExecuteModuleActionScreenDestination(module.id)) }, onClick = {
navigator.navigate(ExecuteModuleActionScreenDestination(module.id))
viewModel.markNeedRefresh()
},
contentPadding = ButtonDefaults.TextButtonContentPadding contentPadding = ButtonDefaults.TextButtonContentPadding
) { ) {
Icon( Icon(