Skip to content

Commit

Permalink
Fix a crash in the scrollbar logic
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharee committed Jan 10, 2025
1 parent 9585814 commit 3cdd4bf
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ fun LazyColumnScrollbarNew(

override val normalizedThumbSizeReal: Float
get() = state.layoutInfo.let {
if (it.totalItemsCount == 0)
if (it.totalItemsCount == 0 || it.visibleItemsInfo.isEmpty())
return@let 0f

val firstItem = realFirstVisibleItem ?: return@let 1.0f
Expand Down

0 comments on commit 3cdd4bf

Please sign in to comment.