mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-27 06:17:27 +00:00
Fixed a bug that caused the String "null" to be shown in the mobile
quickfinder for some events
This commit is contained in:
1 parent
5c5189d269
commit
4f8c1cd516
1 file changed
+5
-3
+5
-3
@@ -11,7 +11,6 @@ import com.sap.sailing.gwt.ui.shared.general.EventReferenceDTO;
|
||||
public class QuickfinderPresenter {
|
||||
private static final StringMessages MSG = StringMessages.INSTANCE;
|
||||
|
||||
|
||||
public QuickfinderPresenter(Quickfinder quickfinder, RegattaLeaderboardNavigationProvider navigator, Collection<RegattaMetadataDTO> regattaMetadatas) {
|
||||
if (regattaMetadatas == null) {
|
||||
quickfinder.removeFromParent();
|
||||
@@ -19,7 +18,11 @@ public class QuickfinderPresenter {
|
||||
}
|
||||
quickfinder.addPlaceholderItem(MSG.resultsQuickfinder());
|
||||
for (RegattaMetadataDTO regattaMetadata : regattaMetadatas) {
|
||||
quickfinder.addItemToGroup(regattaMetadata.getBoatCategory(), regattaMetadata.getDisplayName(), navigator.getRegattaMiniLeaderboardNavigation(regattaMetadata.getId()));
|
||||
String boatCategory = regattaMetadata.getBoatCategory();
|
||||
if(boatCategory == null || boatCategory.isEmpty()) {
|
||||
boatCategory = MSG.regattas();
|
||||
}
|
||||
quickfinder.addItemToGroup(boatCategory, regattaMetadata.getDisplayName(), navigator.getRegattaMiniLeaderboardNavigation(regattaMetadata.getId()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,5 +41,4 @@ public class QuickfinderPresenter {
|
||||
quickfinder.addItemToGroup(seriesName, displayName, navigator.getMiniLeaderboardNavigation(eventOfSeries.getId()));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user