Small changes to SearchResuts

This commit is contained in:
Daniel Martí 2013-12-31 14:49:34 +01:00
parent d1d1201a6e
commit ea0eae6b11

View File

@ -105,24 +105,20 @@ public class SearchResults extends ListActivity {
} }
List<DB.App> apps = new ArrayList<DB.App>(); List<DB.App> apps = new ArrayList<DB.App>();
List<DB.App> tapps = ((FDroidApp) getApplication()).getApps(); List<DB.App> allApps = ((FDroidApp) getApplication()).getApps();
for (DB.App tapp : tapps) { for (DB.App app : allApps) {
boolean include = false; boolean include = false;
for (String tid : matchingids) { for (String id : matchingids) {
if (tid.equals(tapp.id)) { if (id.equals(app.id)) {
include = true; apps.add(app);
break; break;
} }
} }
if (include)
apps.add(tapp);
} }
TextView tv = (TextView) findViewById(R.id.description); TextView tv = (TextView) findViewById(R.id.description);
String headertext; String headertext;
try try {
{
if (apps.size() == 0) if (apps.size() == 0)
headertext = String.format(getString(R.string.searchres_noapps), headertext = String.format(getString(R.string.searchres_noapps),
mQuery); mQuery);