Skip to content

Commit 504873c

Browse files
author
Alex Matečný
authored
Merge pull request #650 from kiwicom/topappbar_scroll_behavior_min_placable_height
Ensure that the height for layouting the topappbar is always at least…
2 parents 2a7f628 + 76116cb commit 504873c

File tree

1 file changed

+1
-1
lines changed
  • ui/src/androidMain/kotlin/kiwi/orbit/compose/ui/controls

1 file changed

+1
-1
lines changed

ui/src/androidMain/kotlin/kiwi/orbit/compose/ui/controls/TopAppBar.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ internal fun Modifier.scrollBehaviorLayout(
182182
if (scrollBehavior.state.heightOffsetLimit != heightOffsetLimit) {
183183
scrollBehavior.state.heightOffsetLimit = heightOffsetLimit
184184
}
185-
val height = placeable.height + scrollBehavior.state.heightOffset.roundToInt()
185+
val height = (placeable.height + scrollBehavior.state.heightOffset.roundToInt()).coerceAtLeast(0)
186186
layout(placeable.width, height) {
187187
placeable.place(0, height - placeable.height)
188188
}

0 commit comments

Comments
 (0)