Skip to content

Commit 5387883

Browse files
authored
fix: exception for sub activity again (#53)
1 parent 25608fb commit 5387883

File tree

1 file changed

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

1 file changed

+7
-7
lines changed

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import androidx.compose.runtime.Composable
1616
import androidx.compose.runtime.DisposableEffect
1717
import androidx.compose.runtime.LaunchedEffect
1818
import androidx.compose.runtime.MutableState
19+
import androidx.compose.runtime.derivedStateOf
1920
import androidx.compose.runtime.getValue
2021
import androidx.compose.runtime.mutableStateListOf
2122
import androidx.compose.runtime.mutableStateOf
@@ -150,12 +151,10 @@ fun ListPopup(
150151
Box(
151152
modifier = popupModifier
152153
.pointerInput(Unit) {
153-
detectTapGestures(
154-
onTap = {
155-
dismissPopup(show)
156-
onDismissRequest?.let { it1 -> it1() }
157-
}
158-
)
154+
detectTapGestures {
155+
dismissPopup(show)
156+
onDismissRequest?.let { it1 -> it1() }
157+
}
159158
}
160159
.layout { measurable, constraints ->
161160
val placeable = measurable.measure(
@@ -179,12 +178,13 @@ fun ListPopup(
179178
}
180179
}
181180
) {
181+
val shape = remember { derivedStateOf { SmoothRoundedCornerShape(16.dp) } }
182182
Box(
183183
Modifier
184184
.align(AbsoluteAlignment.TopLeft)
185185
.graphicsLayer(
186186
clip = true,
187-
shape = SmoothRoundedCornerShape(16.dp),
187+
shape = shape.value,
188188
shadowElevation = dropdownElevation,
189189
ambientShadowColor = MiuixTheme.colorScheme.windowDimming,
190190
spotShadowColor = MiuixTheme.colorScheme.windowDimming

0 commit comments

Comments
 (0)