mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-15 05:17:03 +05:30
fix(android): work around weird scroll issue with saved posts
This commit is contained in:
parent
535624bf22
commit
a791588423
1 changed files with 1 additions and 3 deletions
|
@ -145,9 +145,7 @@ fun LobstersPostsScreen(
|
||||||
icon = Icons.Outlined.FavoriteBorder,
|
icon = Icons.Outlined.FavoriteBorder,
|
||||||
selectedIcon = Icons.Filled.Favorite,
|
selectedIcon = Icons.Filled.Favorite,
|
||||||
) {
|
) {
|
||||||
coroutineScope.launch {
|
coroutineScope.launch { if (savedPosts.isNotEmpty()) savedListState.scrollToItem(0) }
|
||||||
if (savedPosts.isNotEmpty()) savedListState.animateScrollToItem(index = 0)
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue