mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-17 09:38:19 +00:00
Fix bug where recycled BubbleTextView kept their badges.
Bug: 68324671 Change-Id: Id5f4db6706afd002242d95d44422fc61042798c8
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user