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

Commit 24de8f8c authored by 0's avatar 0
Browse files

[flexiglass] Animate scrim to default position when stack height changes

Bug: 347734218
Test: manually verified animation of scrim resetting looks correct
Flag: com.android.systemui.scene_container
Change-Id: Id0a1d4050940e972347a94fc5faef8bc340edb38
parent 41bbda58
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -337,7 +337,7 @@ fun SceneScope.NotificationScrollingStack(
    // expanded, reset scrim offset.
    LaunchedEffect(stackHeight, scrimOffset) {
        snapshotFlow { stackHeight.intValue < minVisibleScrimHeight() && scrimOffset.value < 0f }
            .collect { shouldCollapse -> if (shouldCollapse) scrimOffset.snapTo(0f) }
            .collect { shouldCollapse -> if (shouldCollapse) scrimOffset.animateTo(0f, tween()) }
    }

    // if we receive scroll delta from NSSL, offset the scrim and placeholder accordingly.