Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#2063 add 5 new countries to international flags module #2064

Merged
merged 4 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/main/java/core/db/IfaMatchTable.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ void insertMatch(IfaMatch match) {
store(match);
}

@Override
protected String createSelectStatement(){
return createSelectStatement("");
}
// @Override
// protected String createSelectStatement(){
// return createSelectStatement("");
// }
void deleteAllMatches() {
executePreparedDelete();
}
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/core/model/WorldDetailLeague.java
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,11 @@ public class WorldDetailLeague extends AbstractTable.Storable {
new WorldDetailLeague(163,191,"San Marino"),
new WorldDetailLeague(164,188,"Haiti"),
new WorldDetailLeague(165,190,"Puerto Rico"),
new WorldDetailLeague(166,194,"Grenada"),
new WorldDetailLeague(167,193,"Burkina Faso"),
new WorldDetailLeague(168,192,"Nepal"),
new WorldDetailLeague(169,197,"Guyana"),
new WorldDetailLeague(170,196,"Tahiti"),
new WorldDetailLeague(1000,1000,"International")
};

Expand Down
18 changes: 6 additions & 12 deletions src/main/java/module/ifa/FlagPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ private void initialize(boolean away, IfaModel ifaModel, FlagDisplayModel flagDi
constraints.gridwidth = 1;

if (this.flagLabels != null) {
int i=0;
int i = 0;
for (var flagLabel : this.flagLabels) {
constraints.gridx = i % flagDisplayModel.getFlagWidth();
constraints.gridy = 2 + i / flagDisplayModel.getFlagWidth();
Expand All @@ -94,11 +94,11 @@ void setHeaderVisible(boolean enable) {
}

private void createFlagLabels(boolean away, IfaModel ifaModel, FlagDisplayModel flagDisplayModel) {
this.flagLabels = new ArrayList<FlagLabel>();
this.flagLabels = new ArrayList<>();
WorldDetailsManager.instance().getLeagues().stream()
.filter(l->l.getLeagueId()!=APACHE_LEAGUE_ID)
.sorted((l1,l2)-> ObjectUtils.compare(l1.getCountryName(),l2.getCountryName()))
.forEach(l->addFlagLabel(l, away, ifaModel, flagDisplayModel));
.filter(l -> l.getLeagueId() != APACHE_LEAGUE_ID)
.sorted((l1, l2) -> ObjectUtils.compare(l1.getCountryName(), l2.getCountryName()))
.forEach(l -> addFlagLabel(l, away, ifaModel, flagDisplayModel));
}

private void addFlagLabel(WorldDetailLeague league, boolean away, IfaModel ifaModel, FlagDisplayModel flagDisplayModel) {
Expand All @@ -107,13 +107,7 @@ private void addFlagLabel(WorldDetailLeague league, boolean away, IfaModel ifaMo
flagLabel.setCountryName(league.getCountryName());
flagLabel.setIcon(ImageUtilities.getCountryFlagIcon(flagLabel.getCountryId()));
flagLabel.setToolTipText(flagLabel.getCountryName());

if ((away && ifaModel.isVisited(league.getCountryId()))
|| (!away && ifaModel.isHosted(league.getCountryId()))) {
flagLabel.setEnabled(true);
} else {
flagLabel.setEnabled(false);
}
flagLabel.setEnabled((away && ifaModel.isVisited(league.getCountryId())) || (!away && ifaModel.isHosted(league.getCountryId())));
this.flagLabels.add(flagLabel);
}
}
Binary file modified src/main/resources/flags/166flag.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/flags/167flag.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/flags/168flag.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/flags/169flag.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/flags/170flag.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 4 additions & 3 deletions src/main/resources/release_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,19 @@
HO now downloads the update in the browser when HO install is un-managed.
* Enable standard custom popup menu in oauth dialog's text fields (#1471)
* Move previous series download checkbox to the check box tree of download dialog (#1434)
* Add 5 new countries to international flag module (#2063)

## Translations

Reports by Contributors - September 24, 2023 - April 28, 2024
Reports by Contributors - September 24, 2023 - May 05, 2024

* wsbrenk 355
* \_KOHb\_ 230
* Lidegand 178
* Sebastien 156
* Achilles 70
* \_KOHb\_ 22
* Georgi 10
* Moorhuhninho 3
* sich 3

Total 797
Total 1025