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

Commit c57ba3fb authored by Mady Mellor's avatar Mady Mellor Committed by Android (Google) Code Review
Browse files

Merge "Fix an issue where the top bubble might not be correct" into main

parents ec0db2c3 f9cdc734
Loading
Loading
Loading
Loading
+12 −3
Original line number Diff line number Diff line
@@ -536,7 +536,8 @@ public class BubbleStackView extends FrameLayout
    private OnClickListener mBubbleClickListener = new OnClickListener() {
        @Override
        public void onClick(View view) {
            mIsDraggingStack = false; // If the touch ended in a click, we're no longer dragging.
            // If the touch ended in a click, we're no longer dragging.
            onDraggingEnded();

            // Bubble clicks either trigger expansion/collapse or a bubble switch, both of which we
            // shouldn't interrupt. These are quick transitions, so it's not worth trying to adjust
@@ -719,8 +720,7 @@ public class BubbleStackView extends FrameLayout
                mDismissView.hide();
            }

            mIsDraggingStack = false;
            mMagnetizedObject = null;
            onDraggingEnded();

            // Hide the stack after a delay, if needed.
            updateTemporarilyInvisibleAnimation(false /* hideImmediately */);
@@ -1096,6 +1096,7 @@ public class BubbleStackView extends FrameLayout
            } else {
                maybeShowStackEdu();
            }
            onDraggingEnded();
        });

        animate()
@@ -1152,6 +1153,14 @@ public class BubbleStackView extends FrameLayout
        });
    }

    /**
     * Reset state related to dragging.
     */
    private void onDraggingEnded() {
        mIsDraggingStack = false;
        mMagnetizedObject = null;
    }

    /**
     * Sets whether or not the stack should become temporarily invisible by moving off the side of
     * the screen.