diff --git a/app/src/main/java/com/google/samples/apps/nowinandroid/MainActivityViewModel.kt b/app/src/main/java/com/google/samples/apps/nowinandroid/MainActivityViewModel.kt index ebea4b965..09f4597a7 100644 --- a/app/src/main/java/com/google/samples/apps/nowinandroid/MainActivityViewModel.kt +++ b/app/src/main/java/com/google/samples/apps/nowinandroid/MainActivityViewModel.kt @@ -43,6 +43,6 @@ class MainActivityViewModel @Inject constructor( } sealed interface MainActivityUiState { - object Loading : MainActivityUiState + data object Loading : MainActivityUiState data class Success(val userData: UserData) : MainActivityUiState } diff --git a/core/common/src/main/java/com/google/samples/apps/nowinandroid/core/result/Result.kt b/core/common/src/main/java/com/google/samples/apps/nowinandroid/core/result/Result.kt index 4a06b8b9d..6ae12d634 100644 --- a/core/common/src/main/java/com/google/samples/apps/nowinandroid/core/result/Result.kt +++ b/core/common/src/main/java/com/google/samples/apps/nowinandroid/core/result/Result.kt @@ -24,7 +24,7 @@ import kotlinx.coroutines.flow.onStart sealed interface Result { data class Success(val data: T) : Result data class Error(val exception: Throwable? = null) : Result - object Loading : Result + data object Loading : Result } fun Flow.asResult(): Flow> { diff --git a/core/ui/src/main/java/com/google/samples/apps/nowinandroid/core/ui/NewsFeed.kt b/core/ui/src/main/java/com/google/samples/apps/nowinandroid/core/ui/NewsFeed.kt index 16cd3edf7..4a9f5d7c9 100644 --- a/core/ui/src/main/java/com/google/samples/apps/nowinandroid/core/ui/NewsFeed.kt +++ b/core/ui/src/main/java/com/google/samples/apps/nowinandroid/core/ui/NewsFeed.kt @@ -112,7 +112,7 @@ sealed interface NewsFeedUiState { /** * The feed is still loading. */ - object Loading : NewsFeedUiState + data object Loading : NewsFeedUiState /** * The feed is loaded with the given list of news resources. diff --git a/feature/foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/OnboardingUiState.kt b/feature/foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/OnboardingUiState.kt index 58f4f1683..70634b4c5 100644 --- a/feature/foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/OnboardingUiState.kt +++ b/feature/foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/OnboardingUiState.kt @@ -25,17 +25,17 @@ sealed interface OnboardingUiState { /** * The onboarding state is loading. */ - object Loading : OnboardingUiState + data object Loading : OnboardingUiState /** * The onboarding state was unable to load. */ - object LoadFailed : OnboardingUiState + data object LoadFailed : OnboardingUiState /** * There is no onboarding state. */ - object NotShown : OnboardingUiState + data object NotShown : OnboardingUiState /** * There is a onboarding state, with the given lists of topics. diff --git a/feature/interests/src/main/java/com/google/samples/apps/nowinandroid/feature/interests/InterestsViewModel.kt b/feature/interests/src/main/java/com/google/samples/apps/nowinandroid/feature/interests/InterestsViewModel.kt index debc49bcd..c3d5ab6e8 100644 --- a/feature/interests/src/main/java/com/google/samples/apps/nowinandroid/feature/interests/InterestsViewModel.kt +++ b/feature/interests/src/main/java/com/google/samples/apps/nowinandroid/feature/interests/InterestsViewModel.kt @@ -53,11 +53,11 @@ class InterestsViewModel @Inject constructor( } sealed interface InterestsUiState { - object Loading : InterestsUiState + data object Loading : InterestsUiState data class Interests( val topics: List, ) : InterestsUiState - object Empty : InterestsUiState + data object Empty : InterestsUiState }