Skip to content

Instantly share code, notes, and snippets.

@fluxtah
Created January 31, 2020 10:18
Show Gist options
  • Select an option

  • Save fluxtah/d3e3ebbb5d54c43ccf5bcd1b41352345 to your computer and use it in GitHub Desktop.

Select an option

Save fluxtah/d3e3ebbb5d54c43ccf5bcd1b41352345 to your computer and use it in GitHub Desktop.
val onCardSaved = {
runBlocking {
repository.saveCard(state.card)
goto(Destination.HomeScreen)
}
}
MemsetMainTemplate {
when (state.loadingState) {
LoadingState.Loaded -> CardEditorContent(state, onCardSaved)
LoadingState.Loading -> CardEditorLoading()
LoadingState.Error -> CardEditorLoadingError()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment