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

Commit 5254944a authored by Jon Miranda's avatar Jon Miranda
Browse files

Fix bug where recycled BubbleTextView kept their badges.

Bug: 68324671
Change-Id: Id5f4db6706afd002242d95d44422fc61042798c8
parent 2ff529a5
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -177,6 +177,15 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver {

    }

    /**
     * Resets the view so it can be recycled.
     */
    public void reset() {
        mBadgeInfo = null;
        mBadgePalette = null;
        mForceHideBadge = false;
    }

    public void applyFromShortcutInfo(ShortcutInfo info) {
        applyFromShortcutInfo(info, false);
    }
+1 −0
Original line number Diff line number Diff line
@@ -336,6 +336,7 @@ public class AllAppsGridAdapter extends RecyclerView.Adapter<AllAppsGridAdapter.
            case VIEW_TYPE_PREDICTION_ICON:
                AppInfo info = mApps.getAdapterItems().get(position).appInfo;
                BubbleTextView icon = (BubbleTextView) holder.itemView;
                icon.reset();
                icon.applyFromApplicationInfo(info);
                break;
            case VIEW_TYPE_DISCOVERY_ITEM: