TP-33219 | trigger single action fun (#91)

This commit is contained in:
Maila Rajanikanth
2023-06-20 17:50:08 +05:30
committed by GitHub Enterprise
parent a4b9794c70
commit 8d620ebe1c

View File

@@ -60,6 +60,12 @@ open class UiTronViewModel(
}
}
fun handleAction(uiTronAction: UiTronAction) {
viewModelScope.launch {
actionHandler.handleActions(UiTronActionData(actions = listOf(uiTronAction)), actionCallbackFlow)
}
}
fun getActionCallback() = actionCallbackFlow.asSharedFlow()
@Deprecated("Was Done for a POC. Should be done using Actions")