File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
feature/foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 1616
1717package com.google.samples.apps.nowinandroid.feature.foryou
1818
19- import androidx.compose.runtime.snapshotFlow
2019import androidx.lifecycle.ViewModel
2120import androidx.lifecycle.viewModelScope
2221import com.google.samples.apps.nowinandroid.core.data.repository.UserDataRepository
@@ -33,6 +32,7 @@ import kotlinx.coroutines.flow.SharingStarted
3332import kotlinx.coroutines.flow.StateFlow
3433import kotlinx.coroutines.flow.combine
3534import kotlinx.coroutines.flow.flatMapLatest
35+ import kotlinx.coroutines.flow.flowOf
3636import kotlinx.coroutines.flow.map
3737import kotlinx.coroutines.flow.onStart
3838import kotlinx.coroutines.flow.stateIn
@@ -67,7 +67,7 @@ class ForYouViewModel @Inject constructor(
6767 userData.followedAuthors.isEmpty() &&
6868 userData.followedTopics.isEmpty()
6969 ) {
70- snapshotFlow { NewsFeedUiState .Success (emptyList()) }
70+ flowOf( NewsFeedUiState .Success (emptyList()))
7171 } else {
7272 getSaveableNewsResourcesStream(
7373 filterTopicIds = userData.followedTopics,
You can’t perform that action at this time.
0 commit comments