Support multiple names for the same service (#344)
This commit is contained in:
commit
c359775ebc
2 changed files with 9 additions and 5 deletions
|
@ -97,11 +97,7 @@
|
|||
},
|
||||
{
|
||||
"title": "Mastodon",
|
||||
"slug": "mastodon",
|
||||
"hex": "6364FF"
|
||||
},
|
||||
{
|
||||
"title": "mstdn",
|
||||
"altNames": ["mstdn", "fediscience", "mathstodon", "fosstodon"],
|
||||
"slug": "mastodon",
|
||||
"hex": "6364FF"
|
||||
},
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue