Also filter the list of Archives to only show the compatible ones.

This commit is contained in:
Xavier Ducrohet
2009-07-23 18:02:07 -07:00
parent ba29296c08
commit e5bfd50ece

View File

@@ -163,7 +163,19 @@ public class RepoSourcesAdapter {
} }
} else if (parentElement instanceof Package) { } else if (parentElement instanceof Package) {
return ((Package) parentElement).getArchives(); Archive[] archives = ((Package) parentElement).getArchives();
if (mUpdaterData.getSettingsController().getShowUpdateOnly()) {
for (Archive archive : archives) {
// if we only want the compatible archives, then we just take the first
// one. it's unlikely there are 2 compatible archives for the same
// package
if (archive.isCompatible()) {
return new Object[] { archive };
}
}
}
return archives;
} }
return new Object[0]; return new Object[0];