refactor/Convert object to data object in sealed interface

pull/999/head
kimdowoo 1 year ago
parent 340753b2c5
commit 129099e219

@ -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