Merge pull request #999 from KDW03/convert-to-data-object

refactor/Convert object to data object in sealed interface
pull/921/merge
Don Turner 1 year ago committed by GitHub
commit 15f8861da1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -87,6 +87,6 @@ data class UserEditableSettings(
) )
sealed interface SettingsUiState { sealed interface SettingsUiState {
object Loading : SettingsUiState data object Loading : SettingsUiState
data class Success(val settings: UserEditableSettings) : SettingsUiState data class Success(val settings: UserEditableSettings) : SettingsUiState
} }

@ -177,12 +177,12 @@ private fun newsUiState(
sealed interface TopicUiState { sealed interface TopicUiState {
data class Success(val followableTopic: FollowableTopic) : TopicUiState data class Success(val followableTopic: FollowableTopic) : TopicUiState
object Error : TopicUiState data object Error : TopicUiState
object Loading : TopicUiState data object Loading : TopicUiState
} }
sealed interface NewsUiState { sealed interface NewsUiState {
data class Success(val news: List<UserNewsResource>) : NewsUiState data class Success(val news: List<UserNewsResource>) : NewsUiState
object Error : NewsUiState data object Error : NewsUiState
object Loading : NewsUiState data object Loading : NewsUiState
} }

Loading…
Cancel
Save