Add "Russia", "Canada", "USA"

Don't show country name in for the maps: "Germany Bavaria" > "Bavaria"
This commit is contained in:
nazar-kutz 2021-02-16 21:44:33 +02:00
parent 021ff51533
commit 25744449af
3 changed files with 27 additions and 12 deletions

View file

@ -191,4 +191,13 @@ public class WorldRegion implements Serializable {
}
return false;
}
public boolean isContinent() {
if (superregion != null) {
String superRegionId = superregion.getRegionId();
String thisRegionId = getRegionId();
return WORLD.equals(superRegionId) && !RUSSIA_REGION_ID.equals(thisRegionId);
}
return false;
}
}

View file

@ -418,12 +418,14 @@ public class DownloadResources extends DownloadResourceGroup {
mainGrp.region = reg;
parentGroup.addGroup(mainGrp);
DownloadResourceGroup flatFiles = new DownloadResourceGroup(mainGrp, REGION_MAPS);
List<IndexItem> list = groupByRegion.get(reg);
if (list != null) {
DownloadResourceGroup flatFiles = new DownloadResourceGroup(mainGrp, REGION_MAPS);
for (IndexItem ii : list) {
flatFiles.addItem(ii);
}
}
if (list != null || !reg.isContinent()) {
mainGrp.addGroup(flatFiles);
}
DownloadResourceGroup subRegions = new DownloadResourceGroup(mainGrp, DownloadResourceGroupType.SUBREGIONS);
@ -467,12 +469,16 @@ public class DownloadResources extends DownloadResourceGroup {
addGroup(otherGroup);
createHillshadeSRTMGroups();
collectMultipleIndexesItems();
trimEmptyGroups();
updateLoadedFiles();
collectMultipleIndexesItems(region);
return true;
}
private void collectMultipleIndexesItems() {
collectMultipleIndexesItems(region);
}
private void collectMultipleIndexesItems(@NonNull WorldRegion region) {
List<WorldRegion> subRegions = region.getSubregions();
if (Algorithms.isEmpty(subRegions)) return;

View file

@ -29,7 +29,7 @@ public class MultipleIndexesUiHelper {
OsmandRegions osmandRegions = app.getRegions();
for (IndexItem indexItem : multipleIndexItem.getAllIndexes()) {
SelectableItem selectableItem = new SelectableItem();
selectableItem.setTitle(indexItem.getVisibleName(app, osmandRegions));
selectableItem.setTitle(indexItem.getVisibleName(app, osmandRegions, false));
String size = indexItem.getSizeDescription(app);
String date = indexItem.getDate(dateFormat, showRemoteDate);