File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed
miuix/src/commonMain/kotlin/top/yukonga/miuix/kmp/utils Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments