Fix issues detected by Paparazzi
This commit is contained in:
parent
8220e4bae0
commit
ba70938667
3 changed files with 13 additions and 4 deletions
|
|
@ -114,8 +114,10 @@ private fun ReactionSummaryViewContent(
|
|||
LaunchedEffect(pagerState.currentPage) {
|
||||
selectedReactionKey = summary.reactions[pagerState.currentPage].key
|
||||
val visibleInfo = reactionListState.layoutInfo.visibleItemsInfo
|
||||
if (selectedReactionIndex <= visibleInfo.first().index || selectedReactionIndex >= visibleInfo.last().index) {
|
||||
reactionListState.animateScrollToItem(selectedReactionIndex)
|
||||
if (visibleInfo.isNotEmpty()) {
|
||||
if (selectedReactionIndex <= visibleInfo.first().index || selectedReactionIndex >= visibleInfo.last().index) {
|
||||
reactionListState.animateScrollToItem(selectedReactionIndex)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue