From 312481f0f0a853406b239b03f84bc0028f93d7f2 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Wed, 5 Aug 2020 12:48:38 +0200 Subject: [PATCH] Fix #5708 --- .../osmand/plus/download/ui/DownloadGroupViewHolder.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/download/ui/DownloadGroupViewHolder.java b/OsmAnd/src/net/osmand/plus/download/ui/DownloadGroupViewHolder.java index 2febc9d7f7..5a8a269a2d 100644 --- a/OsmAnd/src/net/osmand/plus/download/ui/DownloadGroupViewHolder.java +++ b/OsmAnd/src/net/osmand/plus/download/ui/DownloadGroupViewHolder.java @@ -72,25 +72,31 @@ public class DownloadGroupViewHolder { } private int getIconColorForOutdatedItems(DownloadResourceGroup group) { + int clr = 0; if (group.getIndividualResources() != null) { for (IndexItem ii : group.getIndividualResources()) { if (ii.getType() == DownloadActivityType.NORMAL_FILE || ii.getType() == DownloadActivityType.ROADS_FILE) { if (ii.isOutdated()) { return R.color.color_distance; + } else if(ii.isDownloaded()) { + clr = R.color.color_ok; } } } } + if (group.getGroups() != null) { for (DownloadResourceGroup g : group.getGroups()) { int d = getIconColorForOutdatedItems(g); if (d == R.color.color_distance) { return d; + } else if(d != 0) { + clr = d; } } } - return R.color.color_ok; + return clr; } public void bindItem(DownloadResourceGroup group) {