Skip to content

Instantly share code, notes, and snippets.

@CesarValiente
Created March 25, 2018 10:48
Show Gist options
  • Save CesarValiente/2c04ee2e6c428847ec546e5a992d73c9 to your computer and use it in GitHub Desktop.
Save CesarValiente/2c04ee2e6c428847ec546e5a992d73c9 to your computer and use it in GitHub Desktop.
sealed class Action
sealed class NavigationAction : Action() {
data class EditItemScreenAction(val item: Item) : NavigationAction()
class ItemsScreenAction : NavigationAction()
}
sealed class ReadAction : Action() {
class FetchItemsAction : ReadAction()
data class ItemsLoadedAction(val items: List<Item>) : ReadAction()
}
sealed class CreationAction : Action() {
data class CreateItemAction(val localId: String, val text: String, val favorite: Boolean = false,
val color: Color, val position: Long) : CreationAction()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment