Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 680b902f authored by András Kurucz's avatar András Kurucz
Browse files

[Dual Shade] Fix Notification Blur getting stuck

While the QS panel is already open, and we drag down from the top left corner to open the Notification panel, we didn't give a chance to this flow to reset its value to 0. This CL fixes it by simplifying the condition, and only mapping the blur fraction to qsExpansion.

Bug: 396346867
Test: Open the Notification panel while QS panel is already open
Flag: com.android.systemui.scene_container
Change-Id: I15f899968f5e65a99570ec6fcb0a416a0fa8a58e
parent d2ade5c3
Loading
Loading
Loading
Loading
+1 −11
Original line number Diff line number Diff line
@@ -55,7 +55,6 @@ import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.combine
import kotlinx.coroutines.flow.combineTransform
import kotlinx.coroutines.flow.distinctUntilChanged
import kotlinx.coroutines.flow.flatMapLatest
import kotlinx.coroutines.flow.flowOf
@@ -227,16 +226,7 @@ constructor(
        if (SceneContainerFlag.isEnabled) {
            shadeModeInteractor.shadeMode.flatMapLatest { shadeMode ->
                when (shadeMode) {
                    ShadeMode.Dual ->
                        combineTransform(
                            shadeInteractor.shadeExpansion,
                            shadeInteractor.qsExpansion,
                        ) { notificationShadeExpansion, qsExpansion ->
                            if (notificationShadeExpansion == 0f) {
                                // Blur out notifications as the QS overlay panel expands
                                emit(qsExpansion)
                            }
                        }
                    ShadeMode.Dual -> shadeInteractor.qsExpansion
                    else -> flowOf(0f)
                }
            }