Skip to content

Commit 17170e6

Browse files
committed
library: Fix SuperDialog does not display WindowDimming again
1 parent 729b4fc commit 17170e6

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ class MiuixPopupUtil {
5454
) {
5555
if (isDialogShowing.value) return
5656
isDialogShowing.value = true
57-
isWindowDimming.value = true
5857
dialogContext.value = content
5958
}
6059

@@ -67,7 +66,6 @@ class MiuixPopupUtil {
6766
show: MutableState<Boolean>,
6867
) {
6968
isDialogShowing.value = false
70-
isWindowDimming.value = false
7169
show.value = false
7270
}
7371

@@ -101,7 +99,6 @@ class MiuixPopupUtil {
10199
show: MutableState<Boolean>,
102100
) {
103101
isPopupShowing.value = false
104-
isWindowDimming.value = false
105102
show.value = false
106103
}
107104

@@ -125,7 +122,7 @@ class MiuixPopupUtil {
125122
dimExitDuration = 150
126123
}
127124
AnimatedVisibility(
128-
visible = (isDialogShowing.value || isPopupShowing.value) && isWindowDimming.value,
125+
visible = isDialogShowing.value || (isPopupShowing.value && isWindowDimming.value),
129126
modifier = Modifier.zIndex(1f).fillMaxSize(),
130127
enter = fadeIn(animationSpec = tween(dimEnterDuration, easing = DecelerateEasing(1.5f))),
131128
exit = fadeOut(animationSpec = tween(dimExitDuration, easing = DecelerateEasing(1.5f)))

0 commit comments

Comments
 (0)