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

Commit 28dd62af authored by Lyn Han's avatar Lyn Han
Browse files

Fix overlapping HUNs

Fixes: 200544499
Test: send tall HUN, then short HUN => no clipping

Change-Id: I0fc643bfc50b2b3617bf3eb163bfe61c75544de4
parent 26b0f4c1
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -202,10 +202,12 @@ public class StackScrollAlgorithm {
            float newHeight = state.height;
            float newNotificationEnd = newYTranslation + newHeight;
            boolean isHeadsUp = (child instanceof ExpandableNotificationRow) && child.isPinned();
            final boolean shadeClosedWithHUN =
                    ambientState.isShadeOpening() && !ambientState.isShadeExpanded();
            if (mClipNotificationScrollToTop
                    && (!state.inShelf || (isHeadsUp && !firstHeadsUp))
                    && newYTranslation < clipStart
                    && !ambientState.isShadeOpening()) {
                    && shadeClosedWithHUN) {
                // The previous view is overlapping on top, clip!
                float overlapAmount = clipStart - newYTranslation;
                state.clipTopAmount = (int) overlapAmount;