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

Commit 94d94a7d authored by Mady Mellor's avatar Mady Mellor
Browse files

Fix subsequent notifs appearing in the shade.

The issue here was that the row was still attached to the bubble expanded
state and there's a check in NotificationViewHiearhchchyManager that skips
adding the notif if it has a view parent.

Fix is simply to remove the row from the parent after dismissal (also
needs the change before this that moves adding the view to the expanded
state only when the bubble is expanded).

Test: manual - have a notif based bubble, dismiss it, get an update for it
               => ensure there is a notification for that update
Fixes: 127381548
Change-Id: I835528fc5af9d1afbd657258fa9f84bd9cc4b679
parent 5029fa63
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -528,7 +528,9 @@ public class BubbleExpandedView extends LinearLayout implements View.OnClickList
    /**
     * Removes and releases an ActivityView if one was previously created for this bubble.
     */
    public void destroyActivityView() {
    public void cleanUpExpandedState() {
        removeView(mNotifRow);

        if (mActivityView == null) {
            return;
        }
+3 −3
Original line number Diff line number Diff line
@@ -348,7 +348,7 @@ public class BubbleStackView extends FrameLayout {

        // Remove it from the views
        int removedIndex = mBubbleContainer.indexOfChild(b.iconView);
        b.expandedView.destroyActivityView();
        b.expandedView.cleanUpExpandedState();
        mBubbleContainer.removeView(b.iconView);

        int bubbleCount = mBubbleContainer.getChildCount();
@@ -377,7 +377,7 @@ public class BubbleStackView extends FrameLayout {
    public void stackDismissed() {
        for (Bubble bubble : mBubbleData.getBubbles()) {
            bubble.entry.setBubbleDismissed(true);
            bubble.expandedView.destroyActivityView();
            bubble.expandedView.cleanUpExpandedState();
        }
        mBubbleData.clear();
        collapseStack();
@@ -458,7 +458,7 @@ public class BubbleStackView extends FrameLayout {
    }

    /**
     * Expands the stack fo bubbles.
     * Expands the stack of bubbles.
     * <p>
     * Must be called from the main thread.
     */