Skip to content

Instantly share code, notes, and snippets.

@MaxMichel2
Last active June 12, 2024 14:20
Show Gist options
  • Save MaxMichel2/0e47d2a038db026db65ed092efca4337 to your computer and use it in GitHub Desktop.
Save MaxMichel2/0e47d2a038db026db65ed092efca4337 to your computer and use it in GitHub Desktop.
The actual implementation of the ViewState for the ForYouScreen (from the Now In Android application)
@Immutable
data class ForYouState(
val topicsLoading: Boolean, // Whether the topics section is in the loading state
val newsLoading: Boolean, // Whether the news section is in the loading state
val topicsVisible: Boolean, // Whether the topics section is visible
val topics: List<FollowableTopic>, // The list of topics to display
val news: List<UserNewsResource> // The list of news to display
) : Reducer.ViewState
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment