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

Commit beb84275 authored by Matt Pietal's avatar Matt Pietal
Browse files

Switch to anyExpansion to prevent flicker

The legacy implementation of ShadeInteractor#isAnyExpanded
includes logic for how the legacy shade works, which includes
a flicker to 1 and then 0 as the shade expands and collapses.
This was causing the notif scrim to show incorrectly on
ALTERNATE_BOUNCER->GONE

Fixes: 338604230
Test: manual - observe notif scrim alpha during transition
Flag: None
Change-Id: Ia944ed90c9bd52f5290b8ffa4b66c90fc4ab3680
parent 0e0db28b
Loading
Loading
Loading
Loading
+30 −27
Original line number Diff line number Diff line
@@ -102,7 +102,10 @@ constructor(
                to = GONE,
            )

        return shadeInteractor.isAnyExpanded.flatMapLatest { isAnyExpanded ->
        return shadeInteractor.anyExpansion
            .map { it > 0f }
            .distinctUntilChanged()
            .flatMapLatest { isAnyExpanded ->
                transitionAnimation
                    .sharedFlow(
                        duration = duration,