Skip to content

Instantly share code, notes, and snippets.

@sergenes
Created August 1, 2021 21:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sergenes/7490d798defe1e572715f019c42b07c0 to your computer and use it in GitHub Desktop.
Save sergenes/7490d798defe1e572715f019c42b07c0 to your computer and use it in GitHub Desktop.
sealed class ListScreenActions(
val source: ListScreenState,
val target: ListScreenState
) {
object OnNameEdit : ListScreenActions(Idle, NameEdit)
object OnNameChanged : ListScreenActions(NameEdit, NameChanged)
object OnAddNewRow : ListScreenActions(Idle, RowNew)
object OnAddNewRowChanged : ListScreenActions(RowNew, RowNewChanged)
object OnSelectRow : ListScreenActions(Idle, RowEdit)
object OnSelectedRowChanged : ListScreenActions(RowEdit, RowEditChanged)
class OnDone(fromState: ListScreenState): ListScreenActions(fromState, Idle)
class OnSave(fromState: ListScreenState): ListScreenActions(fromState, Idle)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment