mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-27 14:27:15 +00:00
Races lists - Used new utility method for resolving competitor flag
image
This commit is contained in:
1 parent
affcf0ad93
commit
65c0d12a7f
1 file changed
+1
-11
+1
-11
@@ -426,17 +426,7 @@ public class RaceListColumnFactory {
|
||||
@Override
|
||||
public void render(Context context, SimpleCompetitorDTO value, SafeHtmlBuilder sb) {
|
||||
if (value != null) {
|
||||
final SafeUri flagImageUri;
|
||||
if (value.getFlagImageURL() == null || value.getFlagImageURL().isEmpty()) {
|
||||
String twoLetterIsoCountryCode = value.getTwoLetterIsoCountryCode();
|
||||
if (twoLetterIsoCountryCode==null || twoLetterIsoCountryCode.isEmpty()) {
|
||||
flagImageUri = FlagImageResolver.getEmptyFlagImageResource().getSafeUri();
|
||||
} else {
|
||||
flagImageUri = FlagImageResolver.getFlagImageResource(twoLetterIsoCountryCode).getSafeUri();
|
||||
}
|
||||
} else {
|
||||
flagImageUri = UriUtils.fromTrustedString(value.getFlagImageURL());
|
||||
}
|
||||
SafeUri flagImageUri = FlagImageResolver.getFlagImageResource(value.getFlagImageURL(), value.getTwoLetterIsoCountryCode());
|
||||
sb.append(TEMPLATE.winner(CSS.race_item_flag(), CSS.race_item_winner(), flagImageUri, value.getName()));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user