Merge branch 'issue-938--feature-graphic-priority' into 'master'
Order apps in main screen by date, new, then presence of feature graphic Closes #938 See merge request !555
This commit is contained in:
commit
b9277f52e7
@ -739,8 +739,9 @@ public class AppProvider extends FDroidProvider {
|
|||||||
case RECENTLY_UPDATED:
|
case RECENTLY_UPDATED:
|
||||||
String table = getTableName();
|
String table = getTableName();
|
||||||
String isNew = table + "." + Cols.LAST_UPDATED + " <= " + table + "." + Cols.ADDED + " DESC";
|
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";
|
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
|
// 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.
|
// 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).
|
// feature image to be loaded).
|
||||||
if (!TextUtils.isEmpty(app.featureGraphic)) {
|
if (!TextUtils.isEmpty(app.featureGraphic)) {
|
||||||
featuredImage.loadImageAndDisplay(ImageLoader.getInstance(),
|
featuredImage.loadImageAndDisplay(ImageLoader.getInstance(),
|
||||||
displayImageOptions, app.featureGraphic);
|
displayImageOptions, app.getFeatureGraphicUrl(activity));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user