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

Commit 8fb48e31 authored by Ioana Alexandru's avatar Ioana Alexandru Committed by Android (Google) Code Review
Browse files

Merge "[Notif redesign] Expander: always show number for groups" into main

parents f637fe86 e247cd04
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -149,9 +149,11 @@ public class NotificationExpandButton extends FrameLayout {
        setContentDescription(mContext.getText(contentDescriptionId));
        mIconView.setImageDrawable(getContext().getDrawable(drawableId));

        if (!notificationsRedesignTemplates()) {
            // changing the expanded state can affect the number display
            updateNumber();
        }
    }

    private void updateNumber() {
        if (shouldShowNumber()) {
@@ -189,6 +191,9 @@ public class NotificationExpandButton extends FrameLayout {
    }

    private boolean shouldShowNumber() {
        if (notificationsRedesignTemplates()) {
            return mNumber > 1;
        }
        return !mExpanded && mNumber > 1;
    }

@@ -230,7 +235,7 @@ public class NotificationExpandButton extends FrameLayout {

    /**
     * Sets the number shown inside the expand button.
     * This only appears when the expand button is collapsed, and when greater than 1.
     * This only appears when {@link this#shouldShowNumber()} is true.
     */
    @RemotableViewMethod
    public void setNumber(int number) {