A fully functional Android app built entirely with Kotlin and Jetpack Compose
rename ForYouInterestsSelectionState -> ForYouInterestsSelectionUiState, ForYouFeedState -> ForYouFeedUiState
madroid25b26bdf13fc
diff --git a/feature-foryou/src/androidTest/java/com/google/samples/apps/nowinandroid/feature/foryou/ForYouScreenTest.kt b/feature-foryou/src/androidTest/java/com/google/samples/apps/nowinandroid/feature/foryou/ForYouScreenTest.ktindex a2e52bdb4..8469cd191 100644--- a/feature-foryou/src/androidTest/java/com/google/samples/apps/nowinandroid/feature/foryou/ForYouScreenTest.kt+++ b/feature-foryou/src/androidTest/java/com/google/samples/apps/nowinandroid/feature/foryou/ForYouScreenTest.kt@@ -67,8 +67,8 @@ class ForYouScreenTest {windowSizeClass = WindowSizeClass.calculateFromSize(DpSize(maxWidth, maxHeight)),- interestsSelectionState = ForYouInterestsSelectionState.Loading,- feedState = ForYouFeedState.Loading,+ interestsSelectionState = ForYouInterestsSelectionUiState.Loading,+ feedState = ForYouFeedUiState.Loading,onAuthorCheckedChanged = { _, _ -> },onTopicCheckedChanged = { _, _ -> },saveFollowedTopics = {},@@ -92,7 +92,7 @@ class ForYouScreenTest {windowSizeClass = WindowSizeClass.calculateFromSize(DpSize(maxWidth, maxHeight)),- interestsSelectionState = ForYouInterestsSelectionState.WithInterestsSelection(+ interestsSelectionState = ForYouInterestsSelectionUiState.WithInterestsSelection(topics = listOf(FollowableTopic(topic = Topic(@@ -153,7 +153,7 @@ class ForYouScreenTest {),)),- feedState = ForYouFeedState.Success(+ feedState = ForYouFeedUiState.Success(feed = emptyList()),onAuthorCheckedChanged = { _, _ -> },@@ -200,7 +200,7 @@ class ForYouScreenTest {windowSizeClass = WindowSizeClass.calculateFromSize(DpSize(maxWidth, maxHeight)),- interestsSelectionState = ForYouInterestsSelectionState.WithInterestsSelection(+ interestsSelectionState = ForYouInterestsSelectionUiState.WithInterestsSelection(topics = listOf(FollowableTopic(topic = Topic(@@ -261,7 +261,7 @@ class ForYouScreenTest {),),),- feedState = ForYouFeedState.Success(+ feedState = ForYouFeedUiState.Success(feed = emptyList()),onAuthorCheckedChanged = { _, _ -> },@@ -314,7 +314,7 @@ class ForYouScreenTest {windowSizeClass = WindowSizeClass.calculateFromSize(DpSize(maxWidth, maxHeight)),- interestsSelectionState = ForYouInterestsSelectionState.WithInterestsSelection(+ interestsSelectionState = ForYouInterestsSelectionUiState.WithInterestsSelection(topics = listOf(FollowableTopic(topic = Topic(@@ -375,7 +375,7 @@ class ForYouScreenTest {),),),- feedState = ForYouFeedState.Success(+ feedState = ForYouFeedUiState.Success(feed = emptyList()),onAuthorCheckedChanged = { _, _ -> },@@ -428,7 +428,7 @@ class ForYouScreenTest {windowSizeClass = WindowSizeClass.calculateFromSize(DpSize(maxWidth, maxHeight)),- interestsSelectionState = ForYouInterestsSelectionState.WithInterestsSelection(+ interestsSelectionState = ForYouInterestsSelectionUiState.WithInterestsSelection(topics = listOf(FollowableTopic(topic = Topic(@@ -489,7 +489,7 @@ class ForYouScreenTest {),),),- feedState = ForYouFeedState.Loading,+ feedState = ForYouFeedUiState.Loading,onAuthorCheckedChanged = { _, _ -> },onTopicCheckedChanged = { _, _ -> },saveFollowedTopics = {},@@ -523,8 +523,8 @@ class ForYouScreenTest {windowSizeClass = WindowSizeClass.calculateFromSize(DpSize(maxWidth, maxHeight)),- interestsSelectionState = ForYouInterestsSelectionState.NoInterestsSelection,- feedState = ForYouFeedState.Loading,+ interestsSelectionState = ForYouInterestsSelectionUiState.NoInterestsSelection,+ feedState = ForYouFeedUiState.Loading,onAuthorCheckedChanged = { _, _ -> },onTopicCheckedChanged = { _, _ -> },saveFollowedTopics = {},@@ -643,8 +643,8 @@ class ForYouScreenTest {ForYouScreen(windowSizeClass = windowSizeClass,- interestsSelectionState = ForYouInterestsSelectionState.NoInterestsSelection,- feedState = ForYouFeedState.Success(+ interestsSelectionState = ForYouInterestsSelectionUiState.NoInterestsSelection,+ feedState = ForYouFeedUiState.Success(feed = saveableNewsResources),onAuthorCheckedChanged = { _, _ -> },diff --git a/feature-foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/ForYouFeedState.kt b/feature-foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/ForYouFeedUiState.ktsimilarity index 91%rename from feature-foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/ForYouFeedState.ktrename to feature-foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/ForYouFeedUiState.ktindex 3d19cc5a3..c6c6c345c 100644--- a/feature-foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/ForYouFeedState.kt+++ b/feature-foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/ForYouFeedUiState.kt@@ -21,11 +21,11 @@ import com.google.samples.apps.nowinandroid.core.model.data.SaveableNewsResource/*** A sealed hierarchy describing the state of the feed on the for you screen.*/-sealed interface ForYouFeedState {+sealed interface ForYouFeedUiState {/*** The feed is still loading.*/- object Loading : ForYouFeedState+ object Loading : ForYouFeedUiState/*** The feed is loaded with the given list of news resources.@@ -35,5 +35,5 @@ sealed interface ForYouFeedState {* The list of news resources contained in this [PopulatedFeed].*/val feed: List<SaveableNewsResource>- ) : ForYouFeedState+ ) : ForYouFeedUiState}diff --git a/feature-foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/ForYouInterestsSelectionState.kt b/feature-foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/ForYouInterestsSelectionUiState.ktsimilarity index 87%rename from feature-foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/ForYouInterestsSelectionState.ktrename to feature-foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/ForYouInterestsSelectionUiState.ktindex bca006d5a..bce65611c 100644--- a/feature-foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/ForYouInterestsSelectionState.kt+++ b/feature-foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/ForYouInterestsSelectionUiState.kt@@ -22,16 +22,16 @@ import com.google.samples.apps.nowinandroid.core.model.data.FollowableTopic/*** A sealed hierarchy describing the interests selection state for the for you screen.*/-sealed interface ForYouInterestsSelectionState {+sealed interface ForYouInterestsSelectionUiState {/*** The interests selection state is loading.*/- object Loading : ForYouInterestsSelectionState+ object Loading : ForYouInterestsSelectionUiState/*** There is no interests selection state.*/- object NoInterestsSelection : ForYouInterestsSelectionState+ object NoInterestsSelection : ForYouInterestsSelectionUiState/*** There is a interests selection state, with the given lists of topics and authors.@@ -39,7 +39,7 @@ sealed interface ForYouInterestsSelectionState {data class WithInterestsSelection(val topics: List<FollowableTopic>,val authors: List<FollowableAuthor>- ) : ForYouInterestsSelectionState {+ ) : ForYouInterestsSelectionUiState {/*** True if the current in-progress selection can be saved.*/diff --git a/feature-foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/ForYouScreen.kt b/feature-foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/ForYouScreen.ktindex 1a03d2751..760042e86 100644--- a/feature-foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/ForYouScreen.kt+++ b/feature-foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/ForYouScreen.kt@@ -123,8 +123,8 @@ fun ForYouRoute(@Composablefun ForYouScreen(windowSizeClass: WindowSizeClass,- interestsSelectionState: ForYouInterestsSelectionState,- feedState: ForYouFeedState,+ interestsSelectionState: ForYouInterestsSelectionUiState,+ feedState: ForYouFeedUiState,onTopicCheckedChanged: (String, Boolean) -> Unit,onAuthorCheckedChanged: (String, Boolean) -> Unit,saveFollowedTopics: () -> Unit,@@ -183,7 +183,7 @@ fun ForYouScreen(// Avoid showing a second loading wheel if we already are for the interests// selectionshowLoadingUIIfLoading =- interestsSelectionState !is ForYouInterestsSelectionState.Loading,+ interestsSelectionState !is ForYouInterestsSelectionUiState.Loading,numberOfColumns = numberOfColumns,onNewsResourcesCheckedChanged = onNewsResourcesCheckedChanged)@@ -212,14 +212,14 @@ fun ForYouScreen(* states.*/private fun LazyListScope.InterestsSelection(- interestsSelectionState: ForYouInterestsSelectionState,+ interestsSelectionState: ForYouInterestsSelectionUiState,showLoadingUIIfLoading: Boolean,onAuthorCheckedChanged: (String, Boolean) -> Unit,onTopicCheckedChanged: (String, Boolean) -> Unit,saveFollowedTopics: () -> Unit) {when (interestsSelectionState) {- ForYouInterestsSelectionState.Loading -> {+ ForYouInterestsSelectionUiState.Loading -> {if (showLoadingUIIfLoading) {item {LoadingWheel(@@ -231,8 +231,8 @@ private fun LazyListScope.InterestsSelection(}}}- ForYouInterestsSelectionState.NoInterestsSelection -> Unit- is ForYouInterestsSelectionState.WithInterestsSelection -> {+ ForYouInterestsSelectionUiState.NoInterestsSelection -> Unit+ is ForYouInterestsSelectionUiState.WithInterestsSelection -> {item {Text(text = stringResource(R.string.onboarding_guidance_title),@@ -298,7 +298,7 @@ private fun LazyListScope.InterestsSelection(@Composableprivate fun TopicSelection(- interestsSelectionState: ForYouInterestsSelectionState.WithInterestsSelection,+ interestsSelectionState: ForYouInterestsSelectionUiState.WithInterestsSelection,onTopicCheckedChanged: (String, Boolean) -> Unit,modifier: Modifier = Modifier) {@@ -412,13 +412,13 @@ fun TopicIcon(* states.*/private fun LazyListScope.Feed(- feedState: ForYouFeedState,+ feedState: ForYouFeedUiState,showLoadingUIIfLoading: Boolean,@IntRange(from = 1) numberOfColumns: Int,onNewsResourcesCheckedChanged: (String, Boolean) -> Unit) {when (feedState) {- ForYouFeedState.Loading -> {+ ForYouFeedUiState.Loading -> {if (showLoadingUIIfLoading) {item {LoadingWheel(@@ -430,7 +430,7 @@ private fun LazyListScope.Feed(}}}- is ForYouFeedState.Success -> {+ is ForYouFeedUiState.Success -> {items(feedState.feed.chunked(numberOfColumns)) { saveableNewsResources ->@@ -496,8 +496,8 @@ fun ForYouScreenLoading() {NiaTheme {ForYouScreen(windowSizeClass = WindowSizeClass.calculateFromSize(DpSize(maxWidth, maxHeight)),- interestsSelectionState = ForYouInterestsSelectionState.Loading,- feedState = ForYouFeedState.Loading,+ interestsSelectionState = ForYouInterestsSelectionUiState.Loading,+ feedState = ForYouFeedUiState.Loading,onTopicCheckedChanged = { _, _ -> },onAuthorCheckedChanged = { _, _ -> },saveFollowedTopics = {},@@ -517,7 +517,7 @@ fun ForYouScreenTopicSelection() {NiaTheme {ForYouScreen(windowSizeClass = WindowSizeClass.calculateFromSize(DpSize(maxWidth, maxHeight)),- interestsSelectionState = ForYouInterestsSelectionState.WithInterestsSelection(+ interestsSelectionState = ForYouInterestsSelectionUiState.WithInterestsSelection(topics = listOf(FollowableTopic(topic = Topic(@@ -589,7 +589,7 @@ fun ForYouScreenTopicSelection() {))),- feedState = ForYouFeedState.Success(+ feedState = ForYouFeedUiState.Success(feed = saveableNewsResource,),onAuthorCheckedChanged = { _, _ -> },@@ -611,8 +611,8 @@ fun PopulatedFeed() {NiaTheme {ForYouScreen(windowSizeClass = WindowSizeClass.calculateFromSize(DpSize(maxWidth, maxHeight)),- interestsSelectionState = ForYouInterestsSelectionState.NoInterestsSelection,- feedState = ForYouFeedState.Success(+ interestsSelectionState = ForYouInterestsSelectionUiState.NoInterestsSelection,+ feedState = ForYouFeedUiState.Success(feed = saveableNewsResource),onTopicCheckedChanged = { _, _ -> },diff --git a/feature-foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/ForYouViewModel.kt b/feature-foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/ForYouViewModel.ktindex 34ed142b9..f7e36c430 100644--- a/feature-foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/ForYouViewModel.kt+++ b/feature-foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/ForYouViewModel.kt@@ -103,7 +103,7 @@ class ForYouViewModel @Inject constructor(mutableStateOf<Set<String>>(emptySet())}- val feedState: StateFlow<ForYouFeedState> =+ val feedState: StateFlow<ForYouFeedUiState> =combine(followedInterestsState,snapshotFlow { inProgressTopicSelection },@@ -114,7 +114,7 @@ class ForYouViewModel @Inject constructor(when (followedInterestsUserState) {// If we don't know the current selection state, emit loading.- Unknown -> flowOf<ForYouFeedState>(ForYouFeedState.Loading)+ Unknown -> flowOf<ForYouFeedUiState>(ForYouFeedUiState.Loading)// If the user has followed topics, use those followed topics to populate the feedis FollowedInterests -> {newsRepository.getNewsResourcesStream(@@ -126,7 +126,7 @@ class ForYouViewModel @Inject constructor(// on the in-progress interests selections, if there are any.None -> {if (inProgressTopicSelection.isEmpty() && inProgressAuthorSelection.isEmpty()) {- flowOf<ForYouFeedState>(ForYouFeedState.Success(emptyList()))+ flowOf<ForYouFeedUiState>(ForYouFeedUiState.Success(emptyList()))} else {newsRepository.getNewsResourcesStream(filterTopicIds = inProgressTopicSelection,@@ -143,10 +143,10 @@ class ForYouViewModel @Inject constructor(.stateIn(scope = viewModelScope,started = SharingStarted.WhileSubscribed(5_000),- initialValue = ForYouFeedState.Loading+ initialValue = ForYouFeedUiState.Loading)- val interestsSelectionState: StateFlow<ForYouInterestsSelectionState> =+ val interestsSelectionState: StateFlow<ForYouInterestsSelectionUiState> =combine(followedInterestsState,topicsRepository.getTopicsStream(),@@ -157,8 +157,8 @@ class ForYouViewModel @Inject constructor(inProgressAuthorSelection ->when (followedInterestsUserState) {- Unknown -> ForYouInterestsSelectionState.Loading- is FollowedInterests -> ForYouInterestsSelectionState.NoInterestsSelection+ Unknown -> ForYouInterestsSelectionUiState.Loading+ is FollowedInterests -> ForYouInterestsSelectionUiState.NoInterestsSelectionNone -> {val topics = availableTopics.map { topic ->FollowableTopic(@@ -174,9 +174,9 @@ class ForYouViewModel @Inject constructor(}if (topics.isEmpty() && authors.isEmpty()) {- ForYouInterestsSelectionState.Loading+ ForYouInterestsSelectionUiState.Loading} else {- ForYouInterestsSelectionState.WithInterestsSelection(+ ForYouInterestsSelectionUiState.WithInterestsSelection(topics = topics,authors = authors)@@ -187,7 +187,7 @@ class ForYouViewModel @Inject constructor(.stateIn(scope = viewModelScope,started = SharingStarted.WhileSubscribed(5_000),- initialValue = ForYouInterestsSelectionState.Loading+ initialValue = ForYouInterestsSelectionUiState.Loading)fun updateTopicSelection(topicId: String, isChecked: Boolean) {@@ -245,7 +245,7 @@ class ForYouViewModel @Inject constructor(private fun Flow<List<NewsResource>>.mapToFeedState(savedNewsResources: Set<String>-): Flow<ForYouFeedState> =+): Flow<ForYouFeedUiState> =filterNot { it.isEmpty() }.map { newsResources ->newsResources.map { newsResource ->@@ -255,5 +255,5 @@ private fun Flow<List<NewsResource>>.mapToFeedState()}}- .map<List<SaveableNewsResource>, ForYouFeedState>(ForYouFeedState::Success)- .onStart { emit(ForYouFeedState.Loading) }+ .map<List<SaveableNewsResource>, ForYouFeedUiState>(ForYouFeedUiState::Success)+ .onStart { emit(ForYouFeedUiState.Loading) }diff --git a/feature-foryou/src/test/java/com/google/samples/apps/nowinandroid/feature/foryou/ForYouViewModelTest.kt b/feature-foryou/src/test/java/com/google/samples/apps/nowinandroid/feature/foryou/ForYouViewModelTest.ktindex 87412f1f3..dffe9c40b 100644--- a/feature-foryou/src/test/java/com/google/samples/apps/nowinandroid/feature/foryou/ForYouViewModelTest.kt+++ b/feature-foryou/src/test/java/com/google/samples/apps/nowinandroid/feature/foryou/ForYouViewModelTest.kt@@ -58,12 +58,12 @@ class ForYouViewModelTest {}/**- * A pairing of [ForYouInterestsSelectionState] and [ForYouFeedState] for ease of testing+ * A pairing of [ForYouInterestsSelectionUiState] and [ForYouFeedUiState] for ease of testing* state updates as a single flow.*/private data class ForYouUiState(- val interestsSelectionState: ForYouInterestsSelectionState,- val feedState: ForYouFeedState,+ val interestsSelectionState: ForYouInterestsSelectionUiState,+ val feedState: ForYouFeedUiState,)private val ForYouViewModel.uiState@@ -79,8 +79,8 @@ class ForYouViewModelTest {viewModel.uiState.test {assertEquals(ForYouUiState(- ForYouInterestsSelectionState.Loading,- ForYouFeedState.Loading+ ForYouInterestsSelectionUiState.Loading,+ ForYouFeedUiState.Loading),awaitItem())@@ -93,8 +93,8 @@ class ForYouViewModelTest {viewModel.uiState.test {assertEquals(ForYouUiState(- ForYouInterestsSelectionState.Loading,- ForYouFeedState.Loading+ ForYouInterestsSelectionUiState.Loading,+ ForYouFeedUiState.Loading),awaitItem())@@ -109,8 +109,8 @@ class ForYouViewModelTest {viewModel.uiState.test {assertEquals(ForYouUiState(- ForYouInterestsSelectionState.Loading,- ForYouFeedState.Loading+ ForYouInterestsSelectionUiState.Loading,+ ForYouFeedUiState.Loading),awaitItem())@@ -125,8 +125,8 @@ class ForYouViewModelTest {viewModel.uiState.test {assertEquals(ForYouUiState(- ForYouInterestsSelectionState.Loading,- ForYouFeedState.Loading+ ForYouInterestsSelectionUiState.Loading,+ ForYouFeedUiState.Loading),awaitItem())@@ -141,8 +141,8 @@ class ForYouViewModelTest {viewModel.uiState.test {assertEquals(ForYouUiState(- ForYouInterestsSelectionState.Loading,- ForYouFeedState.Loading+ ForYouInterestsSelectionUiState.Loading,+ ForYouFeedUiState.Loading),awaitItem())@@ -166,7 +166,7 @@ class ForYouViewModelTest {assertEquals(ForYouUiState(interestsSelectionState =- ForYouInterestsSelectionState.WithInterestsSelection(+ ForYouInterestsSelectionUiState.WithInterestsSelection(topics = listOf(FollowableTopic(topic = Topic(@@ -238,7 +238,7 @@ class ForYouViewModelTest {)),),- feedState = ForYouFeedState.Success(+ feedState = ForYouFeedUiState.Success(feed = emptyList())),@@ -263,7 +263,7 @@ class ForYouViewModelTest {assertEquals(ForYouUiState(interestsSelectionState =- ForYouInterestsSelectionState.WithInterestsSelection(+ ForYouInterestsSelectionUiState.WithInterestsSelection(topics = listOf(FollowableTopic(topic = Topic(@@ -335,7 +335,7 @@ class ForYouViewModelTest {)),),- feedState = ForYouFeedState.Success(+ feedState = ForYouFeedUiState.Success(feed = emptyList())),@@ -359,8 +359,8 @@ class ForYouViewModelTest {assertEquals(ForYouUiState(interestsSelectionState =- ForYouInterestsSelectionState.NoInterestsSelection,- feedState = ForYouFeedState.Loading+ ForYouInterestsSelectionUiState.NoInterestsSelection,+ feedState = ForYouFeedUiState.Loading),awaitItem())@@ -370,8 +370,8 @@ class ForYouViewModelTest {assertEquals(ForYouUiState(interestsSelectionState =- ForYouInterestsSelectionState.NoInterestsSelection,- feedState = ForYouFeedState.Success(+ ForYouInterestsSelectionUiState.NoInterestsSelection,+ feedState = ForYouFeedUiState.Success(feed = sampleNewsResources.map {SaveableNewsResource(newsResource = it,@@ -400,8 +400,8 @@ class ForYouViewModelTest {assertEquals(ForYouUiState(interestsSelectionState =- ForYouInterestsSelectionState.NoInterestsSelection,- feedState = ForYouFeedState.Loading+ ForYouInterestsSelectionUiState.NoInterestsSelection,+ feedState = ForYouFeedUiState.Loading),awaitItem())@@ -411,8 +411,8 @@ class ForYouViewModelTest {assertEquals(ForYouUiState(interestsSelectionState =- ForYouInterestsSelectionState.NoInterestsSelection,- feedState = ForYouFeedState.Success(+ ForYouInterestsSelectionUiState.NoInterestsSelection,+ feedState = ForYouFeedUiState.Success(feed = sampleNewsResources.map {SaveableNewsResource(newsResource = it,@@ -445,7 +445,7 @@ class ForYouViewModelTest {assertEquals(ForYouUiState(interestsSelectionState =- ForYouInterestsSelectionState.WithInterestsSelection(+ ForYouInterestsSelectionUiState.WithInterestsSelection(topics = listOf(FollowableTopic(topic = Topic(@@ -517,7 +517,7 @@ class ForYouViewModelTest {)),),- feedState = ForYouFeedState.Success(+ feedState = ForYouFeedUiState.Success(feed = emptyList(),)),@@ -526,7 +526,7 @@ class ForYouViewModelTest {assertEquals(ForYouUiState(interestsSelectionState =- ForYouInterestsSelectionState.WithInterestsSelection(+ ForYouInterestsSelectionUiState.WithInterestsSelection(topics = listOf(FollowableTopic(topic = Topic(@@ -598,14 +598,14 @@ class ForYouViewModelTest {)),),- feedState = ForYouFeedState.Loading+ feedState = ForYouFeedUiState.Loading),awaitItem())assertEquals(ForYouUiState(interestsSelectionState =- ForYouInterestsSelectionState.WithInterestsSelection(+ ForYouInterestsSelectionUiState.WithInterestsSelection(topics = listOf(FollowableTopic(topic = Topic(@@ -677,7 +677,7 @@ class ForYouViewModelTest {)),),- feedState = ForYouFeedState.Success(+ feedState = ForYouFeedUiState.Success(feed = listOf(SaveableNewsResource(newsResource = sampleNewsResources[1],@@ -714,7 +714,7 @@ class ForYouViewModelTest {assertEquals(ForYouUiState(interestsSelectionState =- ForYouInterestsSelectionState.WithInterestsSelection(+ ForYouInterestsSelectionUiState.WithInterestsSelection(topics = listOf(FollowableTopic(topic = Topic(@@ -786,7 +786,7 @@ class ForYouViewModelTest {)),),- feedState = ForYouFeedState.Success(+ feedState = ForYouFeedUiState.Success(feed = emptyList(),)),@@ -795,7 +795,7 @@ class ForYouViewModelTest {assertEquals(ForYouUiState(interestsSelectionState =- ForYouInterestsSelectionState.WithInterestsSelection(+ ForYouInterestsSelectionUiState.WithInterestsSelection(topics = listOf(FollowableTopic(topic = Topic(@@ -867,14 +867,14 @@ class ForYouViewModelTest {)),),- feedState = ForYouFeedState.Loading+ feedState = ForYouFeedUiState.Loading),awaitItem())assertEquals(ForYouUiState(interestsSelectionState =- ForYouInterestsSelectionState.WithInterestsSelection(+ ForYouInterestsSelectionUiState.WithInterestsSelection(topics = listOf(FollowableTopic(topic = Topic(@@ -946,7 +946,7 @@ class ForYouViewModelTest {)),),- feedState = ForYouFeedState.Success(+ feedState = ForYouFeedUiState.Success(feed = listOf(SaveableNewsResource(newsResource = sampleNewsResources[1],@@ -981,7 +981,7 @@ class ForYouViewModelTest {assertEquals(ForYouUiState(interestsSelectionState =- ForYouInterestsSelectionState.WithInterestsSelection(+ ForYouInterestsSelectionUiState.WithInterestsSelection(topics = listOf(FollowableTopic(topic = Topic(@@ -1053,7 +1053,7 @@ class ForYouViewModelTest {)),),- feedState = ForYouFeedState.Success(+ feedState = ForYouFeedUiState.Success(feed = emptyList())),@@ -1079,7 +1079,7 @@ class ForYouViewModelTest {assertEquals(ForYouUiState(interestsSelectionState =- ForYouInterestsSelectionState.WithInterestsSelection(+ ForYouInterestsSelectionUiState.WithInterestsSelection(topics = listOf(FollowableTopic(topic = Topic(@@ -1151,7 +1151,7 @@ class ForYouViewModelTest {)),),- feedState = ForYouFeedState.Success(+ feedState = ForYouFeedUiState.Success(feed = emptyList())),@@ -1181,8 +1181,8 @@ class ForYouViewModelTest {assertEquals(ForYouUiState(interestsSelectionState =- ForYouInterestsSelectionState.NoInterestsSelection,- feedState = ForYouFeedState.Success(+ ForYouInterestsSelectionUiState.NoInterestsSelection,+ feedState = ForYouFeedUiState.Success(feed = listOf(SaveableNewsResource(newsResource = sampleNewsResources[1],@@ -1223,8 +1223,8 @@ class ForYouViewModelTest {assertEquals(ForYouUiState(interestsSelectionState =- ForYouInterestsSelectionState.NoInterestsSelection,- feedState = ForYouFeedState.Success(+ ForYouInterestsSelectionUiState.NoInterestsSelection,+ feedState = ForYouFeedUiState.Success(feed = listOf(SaveableNewsResource(newsResource = sampleNewsResources[0],@@ -1262,8 +1262,8 @@ class ForYouViewModelTest {assertEquals(ForYouUiState(interestsSelectionState =- ForYouInterestsSelectionState.NoInterestsSelection,- feedState = ForYouFeedState.Success(+ ForYouInterestsSelectionUiState.NoInterestsSelection,+ feedState = ForYouFeedUiState.Success(feed = listOf(SaveableNewsResource(newsResource = sampleNewsResources[1],@@ -1305,7 +1305,7 @@ class ForYouViewModelTest {assertEquals(ForYouUiState(interestsSelectionState =- ForYouInterestsSelectionState.WithInterestsSelection(+ ForYouInterestsSelectionUiState.WithInterestsSelection(topics = listOf(FollowableTopic(topic = Topic(@@ -1377,7 +1377,7 @@ class ForYouViewModelTest {))),- feedState = ForYouFeedState.Success(+ feedState = ForYouFeedUiState.Success(feed = emptyList())),@@ -1409,7 +1409,7 @@ class ForYouViewModelTest {assertEquals(ForYouUiState(interestsSelectionState =- ForYouInterestsSelectionState.WithInterestsSelection(+ ForYouInterestsSelectionUiState.WithInterestsSelection(topics = listOf(FollowableTopic(topic = Topic(@@ -1481,7 +1481,7 @@ class ForYouViewModelTest {))),- feedState = ForYouFeedState.Success(+ feedState = ForYouFeedUiState.Success(feed = emptyList())),@@ -1506,8 +1506,8 @@ class ForYouViewModelTest {assertEquals(ForYouUiState(interestsSelectionState =- ForYouInterestsSelectionState.NoInterestsSelection,- feedState = ForYouFeedState.Success(+ ForYouInterestsSelectionUiState.NoInterestsSelection,+ feedState = ForYouFeedUiState.Success(feed = listOf(SaveableNewsResource(newsResource = sampleNewsResources[1],