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

Commit 2808564d authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix position of gentle notif header after dismiss peoplehub"

parents 0c6d9b48 f9477cc4
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -249,10 +249,8 @@ public class NotificationSectionsManager implements StackScrollAlgorithm.Section
            }
        }

        if (adjustPeopleHubVisibilityAndPosition(lastPersonIndex)) {
        // make room for peopleHub
            firstGentleNotifIndex++;
        }
        firstGentleNotifIndex += adjustPeopleHubVisibilityAndPosition(lastPersonIndex);

        adjustGentleHeaderVisibilityAndPosition(firstGentleNotifIndex);

@@ -296,7 +294,7 @@ public class NotificationSectionsManager implements StackScrollAlgorithm.Section
        }
    }

    private boolean adjustPeopleHubVisibilityAndPosition(int lastPersonIndex) {
    private int adjustPeopleHubVisibilityAndPosition(int lastPersonIndex) {
        final boolean showPeopleHeader = mPeopleHubVisible
                && mNumberOfSections > 2
                && mStatusBarStateController.getState() != StatusBarState.KEYGUARD;
@@ -307,6 +305,7 @@ public class NotificationSectionsManager implements StackScrollAlgorithm.Section
        if (!showPeopleHeader) {
            if (currentlyVisible) {
                mParent.removeView(mPeopleHubView);
                return -1;
            }
        } else {
            mPeopleHubView.unDismiss();
@@ -317,7 +316,7 @@ public class NotificationSectionsManager implements StackScrollAlgorithm.Section
                    mPeopleHubView.setTransientContainer(null);
                }
                mParent.addView(mPeopleHubView, targetIndex);
                return true;
                return 1;
            } else if (currentHubIndex != targetIndex) {
                if (currentHubIndex < targetIndex) {
                    targetIndex--;
@@ -325,7 +324,7 @@ public class NotificationSectionsManager implements StackScrollAlgorithm.Section
                mParent.changeViewPosition(mPeopleHubView, targetIndex);
            }
        }
        return false;
        return 0;
    }

    /**