Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor/Convert object to data object in sealed interface #999

Merged
merged 1 commit into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
}