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

Commit 69ddea52 authored by Ming-Shin Lu's avatar Ming-Shin Lu
Browse files

BrightnessSlider: restart the effect when overriddenByAppState changed

add overridenByAppStete into LaunchedEffect's key list
to fix the brightness warning toast didn't popup when CL [1] introduced
the new brightness UX because when recomposing BrightnessSlidler by
swiping the slider but didn't restart the effect while
overriddenByAppState was changed but LaunchedEffect doesn't know abot
this change.

[1]: I56af0a5b5666d39578bf61f59b7d2ec09441f2a5

Fix: 412076346
Flag: EXAMPT bug fix
Test: atest -d PlatformScenarioTests:SwipeBrightnessShowToast
Change-Id: Id3cb4a491503780216f707f79fedf0c1854c7722
parent 855e2029
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -305,7 +305,7 @@ fun BrightnessSlider(
    // Showing the warning toast if the current running app window has controlled the
    // brightness value.
    if (Flags.showToastWhenAppControlBrightness()) {
        LaunchedEffect(interactionSource) {
        LaunchedEffect(interactionSource, overriddenByAppState) {
            interactionSource.interactions.collect { interaction ->
                if (interaction is DragInteraction.Start && overriddenByAppState) {
                    currentShowToast()