mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-28 15:56:49 +00:00
Keep folder notification dot on rotation
FolderIcon#mDotInfo is stored per instance, but not kept up to date when re-binding on rotation. Bug: 144369875 Change-Id: Ia429e4b4039eb02fb4587f54e33a0717408e4ac2
This commit is contained in:
@@ -180,6 +180,14 @@ public class FolderIcon extends FrameLayout implements FolderListener, IconLabel
|
||||
icon.mLauncher = launcher;
|
||||
icon.mDotRenderer = grid.mDotRendererWorkSpace;
|
||||
icon.setContentDescription(launcher.getString(R.string.folder_name_format, folderInfo.title));
|
||||
|
||||
// Keep the notification dot up to date with the sum of all the content's dots.
|
||||
FolderDotInfo folderDotInfo = new FolderDotInfo();
|
||||
for (WorkspaceItemInfo si : folderInfo.contents) {
|
||||
folderDotInfo.addDotInfo(launcher.getDotInfoForItem(si));
|
||||
}
|
||||
icon.setDotInfo(folderDotInfo);
|
||||
|
||||
Folder folder = Folder.fromXml(launcher);
|
||||
folder.setDragController(launcher.getDragController());
|
||||
folder.setFolderIcon(icon);
|
||||
|
||||
Reference in New Issue
Block a user