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

Commit bf4301f5 authored by Sergey Serokurov's avatar Sergey Serokurov
Browse files

Do not show overflow after the last bubble dismissed (in master).

Bug: 202742002
Test: screen recording before https://drive.google.com/file/d/1KOHZnsW4BAn73slH54Rp1ZK0RXxumrw5/view?usp=sharing
Test: screen recoring after https://drive.google.com/file/d/1tC6iIP2fG84pHcwoyJsySDUm9ciSzjRI/view?usp=sharing

Change-Id: I2342c1c61cf38205b03e10b5ece0392f4bc70c76
parent cee2a3a6
Loading
Loading
Loading
Loading
+4 −11
Original line number Diff line number Diff line
@@ -561,18 +561,11 @@ public class BubbleData {
        overflowBubble(reason, bubbleToRemove);

        if (mBubbles.size() == 1) {
            if (hasOverflowBubbles() && (mPositioner.showingInTaskbar() || isExpanded())) {
                // No more active bubbles but we have stuff in the overflow -- select that view
                // if we're already expanded or always showing.
                setShowingOverflow(true);
                setSelectedBubbleInternal(mOverflow);
            } else {
            setExpandedInternal(false);
            // Don't use setSelectedBubbleInternal because we don't want to trigger an
            // applyUpdate
            mSelectedBubble = null;
        }
        }
        if (indexToRemove < mBubbles.size() - 1) {
            // Removing anything but the last bubble means positions will change.
            mStateChange.orderChanged = true;
+2 −2
Original line number Diff line number Diff line
@@ -793,7 +793,7 @@ public class BubbleDataTest extends ShellTestCase {
    }

    @Test
    public void test_expanded_removeLastBubble_showsOverflowIfNotEmpty() {
    public void test_expanded_removeLastBubble_collapsesIfOverflowNotEmpty() {
        // Setup
        sendUpdatedEntryAtTime(mEntryA1, 1000);
        changeExpandedStateAtTime(true, 2000);
@@ -803,7 +803,7 @@ public class BubbleDataTest extends ShellTestCase {
        mBubbleData.dismissBubbleWithKey(mEntryA1.getKey(), Bubbles.DISMISS_USER_GESTURE);
        verifyUpdateReceived();
        assertThat(mBubbleData.getOverflowBubbles().size()).isGreaterThan(0);
        assertSelectionChangedTo(mBubbleData.getOverflow());
        assertExpandedChangedTo(false);
    }

    @Test