File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
feature/foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,6 @@ import kotlinx.coroutines.flow.combine
3232import kotlinx.coroutines.flow.flatMapLatest
3333import kotlinx.coroutines.flow.flowOf
3434import kotlinx.coroutines.flow.map
35- import kotlinx.coroutines.flow.onStart
3635import kotlinx.coroutines.flow.stateIn
3736import kotlinx.coroutines.launch
3837import javax.inject.Inject
@@ -68,7 +67,8 @@ class ForYouViewModel @Inject constructor(
6867 } else {
6968 getSaveableNewsResources(
7069 filterTopicIds = userData.followedTopics,
71- ).mapToFeedState()
70+ )
71+ .map<List <UserNewsResource >, NewsFeedUiState > (NewsFeedUiState ::Success )
7272 }
7373 }
7474 // Flatten the feed flows.
@@ -116,7 +116,3 @@ class ForYouViewModel @Inject constructor(
116116 }
117117 }
118118}
119-
120- private fun Flow<List<UserNewsResource>>.mapToFeedState (): Flow <NewsFeedUiState > =
121- map<List <UserNewsResource >, NewsFeedUiState > (NewsFeedUiState ::Success )
122- .onStart { emit(NewsFeedUiState .Loading ) }
You can’t perform that action at this time.
0 commit comments