Merge branch 'master' of ssh://github.com/osmandapp/Osmand into WikivoyageExploreCards

This commit is contained in:
Chumva 2018-04-27 12:29:56 +03:00
commit 3ec2ecbecd

View file

@ -72,11 +72,10 @@ public class DownloadResources extends DownloadResourceGroup {
} }
public IndexItem getWorldWikivoyageItem() { public IndexItem getWorldWikivoyageItem() {
DownloadResourceGroup travelGroup = getSubGroupById(DownloadResourceGroupType.TRAVEL_GROUP.getDefaultId()); String groupId = DownloadResourceGroupType.TRAVEL_GROUP.getDefaultId() + "#" +
if (travelGroup != null) { DownloadResourceGroupType.WIKIVOYAGE_MAPS.getDefaultId() + "#" +
DownloadResourceGroup wikivoyageMaps = travelGroup.getSubGroupById(DownloadResourceGroupType.WIKIVOYAGE_MAPS.getDefaultId()); DownloadResourceGroupType.WIKIVOYAGE_HEADER.getDefaultId();
if (wikivoyageMaps != null) { DownloadResourceGroup wikivoyageHeader = getSubGroupById(groupId);
DownloadResourceGroup wikivoyageHeader = wikivoyageMaps.getSubGroupById(DownloadResourceGroupType.WIKIVOYAGE_HEADER.getDefaultId());
if (wikivoyageHeader != null) { if (wikivoyageHeader != null) {
List<IndexItem> items = wikivoyageHeader.getIndividualResources(); List<IndexItem> items = wikivoyageHeader.getIndividualResources();
if (items != null) { if (items != null) {
@ -87,8 +86,6 @@ public class DownloadResources extends DownloadResourceGroup {
} }
} }
} }
}
}
return null; return null;
} }