Skip to content

Commit

Permalink
Merge pull request #650 from kiwicom/topappbar_scroll_behavior_min_pl…
Browse files Browse the repository at this point in the history
…acable_height

Ensure that the height for layouting the topappbar is always at least…
  • Loading branch information
Alex Matečný authored Apr 26, 2024
2 parents 2a7f628 + 76116cb commit 504873c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ internal fun Modifier.scrollBehaviorLayout(
if (scrollBehavior.state.heightOffsetLimit != heightOffsetLimit) {
scrollBehavior.state.heightOffsetLimit = heightOffsetLimit
}
val height = placeable.height + scrollBehavior.state.heightOffset.roundToInt()
val height = (placeable.height + scrollBehavior.state.heightOffset.roundToInt()).coerceAtLeast(0)
layout(placeable.width, height) {
placeable.place(0, height - placeable.height)
}
Expand Down

0 comments on commit 504873c

Please sign in to comment.