Skip to content

armgit / ente

Public Imported from GitHub
0

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

Support multiple names for the same service

vishnukvmd16bb23d97737
diff --git a/assets/custom-icons/_data/custom-icons.json b/assets/custom-icons/_data/custom-icons.json
index e559afe7d0..96cada4285 100644
--- a/assets/custom-icons/_data/custom-icons.json
+++ b/assets/custom-icons/_data/custom-icons.json
@@ -97,11 +97,7 @@
},
{
"title": "Mastodon",
- "slug": "mastodon",
- "hex": "6364FF"
- },
- {
- "title": "mstdn",
+ "altNames": ["mstdn", "fediscience", "mathstodon", "fosstodon"],
"slug": "mastodon",
"hex": "6364FF"
},
diff --git a/lib/ui/utils/icon_utils.dart b/lib/ui/utils/icon_utils.dart
index 27da8752ba..7cb1299ac5 100644
--- a/lib/ui/utils/icon_utils.dart
+++ b/lib/ui/utils/icon_utils.dart
@@ -93,6 +93,14 @@ class IconUtils {
icon["slug"],
icon["hex"],
);
+ if (icon["altNames"] != null) {
+ for (final name in icon["altNames"]) {
+ _customIcons[name] = CustomIconData(
+ icon["slug"],
+ icon["hex"],
+ );
+ }
+ }
}
} catch (e) {
Logger("IconUtils").severe("Error loading icons", e);