A fully functional Android app built entirely with Kotlin and Jetpack Compose
Fix bookmarking scrolling to top of the page bug (#548)
Manuel Vivo20c29a6c0912
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 4895f8306..d75965778 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@@ -32,7 +32,6 @@ import kotlinx.coroutines.flow.combineimport kotlinx.coroutines.flow.flatMapLatestimport kotlinx.coroutines.flow.flowOfimport kotlinx.coroutines.flow.map-import kotlinx.coroutines.flow.onStartimport kotlinx.coroutines.flow.stateInimport kotlinx.coroutines.launchimport javax.inject.Inject@@ -68,7 +67,8 @@ class ForYouViewModel @Inject constructor(} else {getSaveableNewsResources(filterTopicIds = userData.followedTopics,- ).mapToFeedState()+ )+ .map<List<UserNewsResource>, NewsFeedUiState>(NewsFeedUiState::Success)}}// Flatten the feed flows.@@ -116,7 +116,3 @@ class ForYouViewModel @Inject constructor(}}}--private fun Flow<List<UserNewsResource>>.mapToFeedState(): Flow<NewsFeedUiState> =- map<List<UserNewsResource>, NewsFeedUiState>(NewsFeedUiState::Success)- .onStart { emit(NewsFeedUiState.Loading) }