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

Commit 1a263aff authored by Danny Burakov's avatar Danny Burakov
Browse files

[flexiglass] Update the HUN drawBounds after applying the Y-offset.

Fix: 442819907
Test: Manually tested by receing a HUN on the lock screen and observing
 correct placement.
Flag: com.android.systemui.scene_container
Change-Id: Ifba59e85658a0fb250c6c19b5a05954bde7789f2
parent d77a1be6
Loading
Loading
Loading
Loading
+11 −11
Original line number Diff line number Diff line
@@ -254,6 +254,17 @@ fun ContentScope.SnoozeableHeadsUpNotificationSpace(
        viewModel = viewModel,
        modifier =
            modifier
                .absoluteOffset {
                    IntOffset(
                        x = 0,
                        y =
                            calculateHeadsUpPlaceholderYOffset(
                                scrollOffset.roundToInt(),
                                minScrollOffset.roundToInt(),
                                stackScrollView.topHeadsUpHeight,
                            ),
                    )
                }
                .onGloballyPositioned {
                    if (updateDrawBounds) {
                        stackScrollView.updateDrawBounds(
@@ -266,17 +277,6 @@ fun ContentScope.SnoozeableHeadsUpNotificationSpace(
                        )
                    }
                }
                .absoluteOffset {
                    IntOffset(
                        x = 0,
                        y =
                            calculateHeadsUpPlaceholderYOffset(
                                scrollOffset.roundToInt(),
                                minScrollOffset.roundToInt(),
                                stackScrollView.topHeadsUpHeight,
                            ),
                    )
                }
                .thenIf(isSnoozable) { Modifier.nestedScroll(snoozeScrollConnection) }
                .scrollable(orientation = Orientation.Vertical, state = scrollableState),
    )