Fix #5708
This commit is contained in:
parent
1a269e802d
commit
312481f0f0
1 changed files with 7 additions and 1 deletions
|
@ -72,25 +72,31 @@ public class DownloadGroupViewHolder {
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getIconColorForOutdatedItems(DownloadResourceGroup group) {
|
private int getIconColorForOutdatedItems(DownloadResourceGroup group) {
|
||||||
|
int clr = 0;
|
||||||
if (group.getIndividualResources() != null) {
|
if (group.getIndividualResources() != null) {
|
||||||
for (IndexItem ii : group.getIndividualResources()) {
|
for (IndexItem ii : group.getIndividualResources()) {
|
||||||
if (ii.getType() == DownloadActivityType.NORMAL_FILE
|
if (ii.getType() == DownloadActivityType.NORMAL_FILE
|
||||||
|| ii.getType() == DownloadActivityType.ROADS_FILE) {
|
|| ii.getType() == DownloadActivityType.ROADS_FILE) {
|
||||||
if (ii.isOutdated()) {
|
if (ii.isOutdated()) {
|
||||||
return R.color.color_distance;
|
return R.color.color_distance;
|
||||||
|
} else if(ii.isDownloaded()) {
|
||||||
|
clr = R.color.color_ok;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (group.getGroups() != null) {
|
if (group.getGroups() != null) {
|
||||||
for (DownloadResourceGroup g : group.getGroups()) {
|
for (DownloadResourceGroup g : group.getGroups()) {
|
||||||
int d = getIconColorForOutdatedItems(g);
|
int d = getIconColorForOutdatedItems(g);
|
||||||
if (d == R.color.color_distance) {
|
if (d == R.color.color_distance) {
|
||||||
return d;
|
return d;
|
||||||
|
} else if(d != 0) {
|
||||||
|
clr = d;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return R.color.color_ok;
|
return clr;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void bindItem(DownloadResourceGroup group) {
|
public void bindItem(DownloadResourceGroup group) {
|
||||||
|
|
Loading…
Reference in a new issue