Skip to content

Instantly share code, notes, and snippets.

@mcatta
Created October 25, 2022 19:18
Show Gist options
  • Save mcatta/174c9ae4841c647a72d70c79166f8dbb to your computer and use it in GitHub Desktop.
Save mcatta/174c9ae4841c647a72d70c79166f8dbb to your computer and use it in GitHub Desktop.
sealed interface GithubState {
data class Load(val owner: String) : GithubState
data class Error(val e: Throwable, val owner: String) : GithubState
data class ContentState(
val repositories: List<Repository> = emptyList(),
val owner: String = "",
) : GithubState
}
sealed interface GithubAction {
object Confirm : GithubAction
object RetryLoadingAction : GithubAction
data class TypeOwner(val input: String) : GithubAction
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment