Skip to content

Commit

Permalink
Merge pull request android#999 from KDW03/convert-to-data-object
Browse files Browse the repository at this point in the history
refactor/Convert object to data object in sealed interface
  • Loading branch information
dturner committed Oct 25, 2023
2 parents 74ed483 + 129099e commit 15f8861
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,6 @@ data class UserEditableSettings(
)

sealed interface SettingsUiState {
object Loading : SettingsUiState
data object Loading : SettingsUiState
data class Success(val settings: UserEditableSettings) : SettingsUiState
}
Original file line number Diff line number Diff line change
Expand Up @@ -177,12 +177,12 @@ private fun newsUiState(

sealed interface TopicUiState {
data class Success(val followableTopic: FollowableTopic) : TopicUiState
object Error : TopicUiState
object Loading : TopicUiState
data object Error : TopicUiState
data object Loading : TopicUiState
}

sealed interface NewsUiState {
data class Success(val news: List<UserNewsResource>) : NewsUiState
object Error : NewsUiState
object Loading : NewsUiState
data object Error : NewsUiState
data object Loading : NewsUiState
}

0 comments on commit 15f8861

Please sign in to comment.