We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c733b55 commit fbb1e66Copy full SHA for fbb1e66
JetNews/app/src/main/java/com/example/jetnews/ui/home/HomeScreens.kt
@@ -163,8 +163,10 @@ fun HomeFeedWithArticleDetailsScreen(
163
// Crossfade between different detail posts
164
Crossfade(targetState = hasPostsUiState.selectedPost) { detailPost ->
165
// Get the lazy list state for this detail view
166
- val detailLazyListState by derivedStateOf {
167
- articleDetailLazyListStates.getValue(detailPost.id)
+ val detailLazyListState by remember {
+ derivedStateOf {
168
+ articleDetailLazyListStates.getValue(detailPost.id)
169
+ }
170
}
171
172
// Key against the post id to avoid sharing any state between different posts
0 commit comments