Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Fix altname icons when slug is missing

Neeraj Gupta447bb72556f8
diff --git a/auth/lib/ui/utils/icon_utils.dart b/auth/lib/ui/utils/icon_utils.dart
index 9487ac8b8d..1304357f92 100644
--- a/auth/lib/ui/utils/icon_utils.dart
+++ b/auth/lib/ui/utils/icon_utils.dart
@@ -71,11 +71,10 @@ class IconUtils {
if (!processedIconPaths.contains(simpleIconPath)) {
allIcons[simpleEntry.key] = AllIconData(
- title: simpleEntry.key,
- type: IconType.simpleIcon,
- color: simpleEntry.value,
- slug: simpleEntry.value
- );
+ title: simpleEntry.key,
+ type: IconType.simpleIcon,
+ color: simpleEntry.value,
+ slug: simpleEntry.value);
processedIconPaths.add(simpleIconPath);
}
simpleEntry = simpleIterator.moveNext() ? simpleIterator.current : null;
@@ -222,7 +221,7 @@ class IconUtils {
for (final name in icon["altNames"]) {
_customIcons[name.toString().replaceAll(' ', '').toLowerCase()] =
CustomIconData(
- icon["slug"],
+ icon["slug"] ?? ((icon["title"] as String).toLowerCase()),
icon["hex"],
);
}