mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-17 09:38:19 +00:00
Rename "badges" to "dots" where appropriate
This will reduce confusion with the other "badging" concept we use for, e.g. work profiles. It is also consistent with the external name "notification dots". Change-Id: I2a2c9d96dc0d6284eb0c48adc78a856271caad4d
This commit is contained in:
@@ -63,7 +63,7 @@ import com.android.launcher3.accessibility.AccessibleDragListenerAdapter;
|
||||
import com.android.launcher3.accessibility.WorkspaceAccessibilityHelper;
|
||||
import com.android.launcher3.anim.AnimatorSetBuilder;
|
||||
import com.android.launcher3.anim.Interpolators;
|
||||
import com.android.launcher3.badge.FolderBadgeInfo;
|
||||
import com.android.launcher3.dot.FolderDotInfo;
|
||||
import com.android.launcher3.compat.AppWidgetManagerCompat;
|
||||
import com.android.launcher3.config.FeatureFlags;
|
||||
import com.android.launcher3.dragndrop.DragController;
|
||||
@@ -3168,7 +3168,7 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
|
||||
});
|
||||
}
|
||||
|
||||
public void updateIconBadges(final Set<PackageUserKey> updatedBadges) {
|
||||
public void updateNotificationDots(final Set<PackageUserKey> updatedDots) {
|
||||
final PackageUserKey packageUserKey = new PackageUserKey(null, null);
|
||||
final IntSet folderIds = new IntSet();
|
||||
mapOverItems(MAP_RECURSE, new ItemOperator() {
|
||||
@@ -3176,8 +3176,8 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
|
||||
public boolean evaluate(ItemInfo info, View v) {
|
||||
if (info instanceof ShortcutInfo && v instanceof BubbleTextView
|
||||
&& packageUserKey.updateFromItemInfo(info)) {
|
||||
if (updatedBadges.contains(packageUserKey)) {
|
||||
((BubbleTextView) v).applyBadgeState(info, true /* animate */);
|
||||
if (updatedDots.contains(packageUserKey)) {
|
||||
((BubbleTextView) v).applyDotState(info, true /* animate */);
|
||||
folderIds.add(info.container);
|
||||
}
|
||||
}
|
||||
@@ -3192,11 +3192,11 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
|
||||
public boolean evaluate(ItemInfo info, View v) {
|
||||
if (info instanceof FolderInfo && folderIds.contains(info.id)
|
||||
&& v instanceof FolderIcon) {
|
||||
FolderBadgeInfo folderBadgeInfo = new FolderBadgeInfo();
|
||||
FolderDotInfo folderDotInfo = new FolderDotInfo();
|
||||
for (ShortcutInfo si : ((FolderInfo) info).contents) {
|
||||
folderBadgeInfo.addBadgeInfo(mLauncher.getBadgeInfoForItem(si));
|
||||
folderDotInfo.addDotInfo(mLauncher.getDotInfoForItem(si));
|
||||
}
|
||||
((FolderIcon) v).setBadgeInfo(folderBadgeInfo);
|
||||
((FolderIcon) v).setDotInfo(folderDotInfo);
|
||||
}
|
||||
// process all the shortcuts
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user