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

Commit a61ac5aa authored by Ioana Alexandru's avatar Ioana Alexandru Committed by Android (Google) Code Review
Browse files

Merge "Go back to using ambientState for footer hiding" into main

parents fe8be976 77627ace
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -594,7 +594,11 @@ public class StackScrollAlgorithm {
        );
        if (view instanceof FooterView) {
            if (FooterViewRefactor.isEnabled()) {
                if (((FooterView) view).shouldBeHidden()) {
                // TODO(b/333445519): shouldBeHidden should reflect whether the shade is closed
                //  already, so we shouldn't need to use ambientState here. However, currently it
                //  doesn't get updated quickly enough and can cause the footer to flash when
                //  closing the shade. As such, we temporarily also check the ambientState directly.
                if (((FooterView) view).shouldBeHidden() || !ambientState.isShadeExpanded()) {
                    viewState.hidden = true;
                } else {
                    final float footerEnd = algorithmState.mCurrentExpandedYPosition