Skip to content

Instantly share code, notes, and snippets.

@sergenes
Last active August 3, 2021 19:33
Show Gist options
  • Save sergenes/3606ccc603e5ac62095af534be8ca0fc to your computer and use it in GitHub Desktop.
Save sergenes/3606ccc603e5ac62095af534be8ca0fc to your computer and use it in GitHub Desktop.
fun done() { onAction(ListScreenActions.OnDone(state()))}
fun save(runBefore: () -> Unit) {
onAction(ListScreenActions.OnSave(state()), runBefore = runBefore)
}
fun backToPrevState() {
state().back?.let {
screenState.value = it
}
}
fun state(): ListScreenState = screenState.value
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment