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

Commit f38d6c3b authored by Selim Cinek's avatar Selim Cinek
Browse files

Fixed an icon flickering when adding a notification

If an added notification was overlapping with the shelf,
it's icon would flicker.

Test: manual, add notification on bottom, observe icons
Change-Id: Iddbb2402a3595ff62594f77582725e87f7a67bfd
Fixes: 62600772
parent d43bc31e
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -943,6 +943,10 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView
        }
    }

    public boolean isDrawingAppearAnimation() {
        return mDrawingAppearAnimation;
    }

    @Override
    protected void dispatchDraw(Canvas canvas) {
        if (mDrawingAppearAnimation) {
+5 −0
Original line number Diff line number Diff line
@@ -452,6 +452,11 @@ public class NotificationShelf extends ActivatableNotificationView implements
            iconState.scaleX = newSize / icon.getHeight() / icon.getIconScale();
            iconState.scaleY = iconState.scaleX;
            iconState.hidden = transitionAmount == 0.0f && !iconState.isAnimating(icon);
            boolean isAppearing = row.isDrawingAppearAnimation() && !row.isInShelf();
            if (isAppearing) {
                iconState.hidden = true;
                iconState.iconAppearAmount = 0.0f;
            }
            iconState.alpha = alpha;
            iconState.yTranslation = iconYTranslation;
            if (stayingInShelf) {