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

Commit 7be4c616 authored by Joshua Tsuji's avatar Joshua Tsuji
Browse files

Fix inability to return to selected bubble after opening overflow.

Test: Expand the stack, tap overflow, tap the previously selected bubble, observe that it expands the previous bubble instead of doing nothing.
Fixes: 150791968
Change-Id: Ibe43fd744b818744182f6f70d7126daab02bd185
parent abe13200
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -1421,6 +1421,18 @@ public class BubbleStackView extends FrameLayout {
        hideDismissTarget();
    }

    /** Expands the clicked bubble. */
    public void expandBubble(Bubble bubble) {
        if (bubble.equals(mBubbleData.getSelectedBubble())) {
            // If the bubble we're supposed to expand is the selected bubble, that means the
            // overflow bubble is currently expanded. Don't tell BubbleData to set this bubble as
            // selected, since it already is. Just call the stack's setSelectedBubble to expand it.
            setSelectedBubble(bubble);
        } else {
            mBubbleData.setSelectedBubble(bubble);
        }
    }

    void onDragStart() {
        if (DEBUG_BUBBLE_STACK_VIEW) {
            Log.d(TAG, "onDragStart()");
+1 −1
Original line number Diff line number Diff line
@@ -189,7 +189,7 @@ class BubbleTouchHandler implements View.OnTouchListener {
                    if (key == BubbleOverflow.KEY) {
                        mStack.showOverflow();
                    } else {
                        mBubbleData.setSelectedBubble(mBubbleData.getBubbleWithKey(key));
                        mStack.expandBubble(mBubbleData.getBubbleWithKey(key));
                    }
                }
                resetForNextGesture();