Order apps in main screen by date, new, then presence of feature graphic
This is a conservative fix. If we wanted to really highlight the feature graphic functionality and reward upstream devs for keeping metadata up to date, then we could also take apps which were recently updated, and prioritise them over new apps if they have a feature graphic. Fixes #938. Also fixed display of feature graphic in main screen by getting full path to image, not the relative path (e.g. "en-US/featureGraphic.png").
This commit is contained in:
parent
61ab88f8ea
commit
5b52835097
@ -739,8 +739,9 @@ public class AppProvider extends FDroidProvider {
|
||||
case RECENTLY_UPDATED:
|
||||
String table = getTableName();
|
||||
String isNew = table + "." + Cols.LAST_UPDATED + " <= " + table + "." + Cols.ADDED + " DESC";
|
||||
String hasFeatureGraphic = table + "." + Cols.FEATURE_GRAPHIC + " IS NULL ASC ";
|
||||
String lastUpdated = table + "." + Cols.LAST_UPDATED + " DESC";
|
||||
sortOrder = lastUpdated + ", " + isNew;
|
||||
sortOrder = lastUpdated + ", " + isNew + ", " + hasFeatureGraphic;
|
||||
|
||||
// There seems no reason to limit the number of apps on the front page, but it helps
|
||||
// if it loads quickly, as it is the default view shown every time F-Droid is opened.
|
||||
|
@ -133,7 +133,7 @@ public class AppCardController extends RecyclerView.ViewHolder
|
||||
// feature image to be loaded).
|
||||
if (!TextUtils.isEmpty(app.featureGraphic)) {
|
||||
featuredImage.loadImageAndDisplay(ImageLoader.getInstance(),
|
||||
displayImageOptions, app.featureGraphic);
|
||||
displayImageOptions, app.getFeatureGraphicUrl(activity));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user