From 396dc05142b505dd02dfcd2e17a9760f884415af Mon Sep 17 00:00:00 2001 From: fankesyooni Date: Fri, 1 Dec 2023 10:21:48 +0800 Subject: [PATCH] style: optimize code in Dropdown --- .../highcapable/flexiui/component/Dropdown.kt | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/flexiui-core/src/commonMain/kotlin/com/highcapable/flexiui/component/Dropdown.kt b/flexiui-core/src/commonMain/kotlin/com/highcapable/flexiui/component/Dropdown.kt index 7b657d8..f093ccd 100644 --- a/flexiui-core/src/commonMain/kotlin/com/highcapable/flexiui/component/Dropdown.kt +++ b/flexiui-core/src/commonMain/kotlin/com/highcapable/flexiui/component/Dropdown.kt @@ -310,17 +310,6 @@ fun DropdownMenuBox( } } -@Composable -internal expect fun DropdownMenuMeasureBox( - menuMaxHeight: (Dp) -> Unit, - content: @Composable BoxScope.() -> Unit -) - -@Stable -interface DropdownMenuBoxScope : BoxWithConstraintsScope { - val menuMaxHeight: Dp -} - @Composable fun DropdownMenuItem( onClick: () -> Unit, @@ -362,6 +351,17 @@ fun DropdownMenuItem( } } +@Composable +internal expect fun DropdownMenuMeasureBox( + menuMaxHeight: (Dp) -> Unit, + content: @Composable BoxScope.() -> Unit +) + +@Stable +interface DropdownMenuBoxScope : BoxWithConstraintsScope { + val menuMaxHeight: Dp +} + @Composable private fun DropdownMenuContent( expandedStates: MutableTransitionState,