Change name to id on AccountBadge

This makes it distinct from the localized name field on the Badge
entity that is returned.
This commit is contained in:
Ehren Kret
2021-09-15 16:44:42 -05:00
parent 98a31d1474
commit 34e21b9f7b
3 changed files with 13 additions and 13 deletions

View File

@@ -89,10 +89,10 @@ public class ConfiguredProfileBadgeConverter implements ProfileBadgeConverter {
return accountBadges.stream()
.filter(accountBadge -> accountBadge.isVisible()
&& now.isBefore(accountBadge.getExpiration())
&& knownBadges.containsKey(accountBadge.getName()))
.map(accountBadge -> new Badge(knownBadges.get(accountBadge.getName()).getImageUrl(),
resourceBundle.getString(accountBadge.getName() + "_name"),
resourceBundle.getString(accountBadge.getName() + "_description")))
&& knownBadges.containsKey(accountBadge.getId()))
.map(accountBadge -> new Badge(knownBadges.get(accountBadge.getId()).getImageUrl(),
resourceBundle.getString(accountBadge.getId() + "_name"),
resourceBundle.getString(accountBadge.getId() + "_description")))
.collect(Collectors.toList());
}
}