Skip to content

Commit 8907ccd

Browse files
committed
misc: remove redundant variable;
1 parent eb0592c commit 8907ccd

File tree

1 file changed

+0
-6
lines changed
  • miuix/src/commonMain/kotlin/top/yukonga/miuix/kmp/basic

1 file changed

+0
-6
lines changed

miuix/src/commonMain/kotlin/top/yukonga/miuix/kmp/basic/ListPopup.kt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,7 @@ fun ListPopupColumn(
237237
SubcomposeLayout(
238238
modifier = Modifier.verticalScroll(rememberScrollState())
239239
) { constraints ->
240-
var itemCount = 0
241240
var listHeight = 0
242-
var visibleHeight = 0
243241
val listWidth = subcompose("miuixPopupListFake", content).map {
244242
it.measure(constraints.copy(
245243
minWidth = 200.dp.roundToPx(), maxWidth = 288.dp.roundToPx()
@@ -249,11 +247,7 @@ fun ListPopupColumn(
249247
val placeable = it.measure(constraints.copy(
250248
minWidth = listWidth, maxWidth = listWidth
251249
))
252-
if (itemCount < 8) {
253-
visibleHeight += placeable.height
254-
}
255250
listHeight += placeable.height
256-
itemCount++
257251
placeable
258252
}
259253
layout(listWidth, min(constraints.maxHeight, listHeight)) {

0 commit comments

Comments
 (0)