Skip to content

Commit 9c7600e

Browse files
committed
library: Fix MiuixPopupUtils zIndex
1 parent b23bace commit 9c7600e

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

miuix/src/commonMain/kotlin/top/yukonga/miuix/kmp/utils/MiuixPopupUtils.kt

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -278,11 +278,12 @@ class MiuixPopupUtils {
278278
) {
279279
dialogState.content()
280280
}
281-
}
282-
283-
DisposableEffect(showState) {
284-
onDispose {
285-
dialogStates.remove(showState)
281+
DisposableEffect(showState) {
282+
onDispose {
283+
if (!showState.value) {
284+
dialogStates.remove(showState)
285+
}
286+
}
286287
}
287288
}
288289
}
@@ -324,11 +325,12 @@ class MiuixPopupUtils {
324325
) {
325326
popupState.content()
326327
}
327-
}
328-
329-
DisposableEffect(showState) {
330-
onDispose {
331-
popupStates.remove(showState)
328+
DisposableEffect(showState) {
329+
onDispose {
330+
if (!showState.value) {
331+
popupStates.remove(showState)
332+
}
333+
}
332334
}
333335
}
334336
}

0 commit comments

Comments
 (0)