Add sorting repo by update time

This commit is contained in:
topjohnwu
2017-12-27 01:07:33 +08:00
parent 0e109ef979
commit 6a148b5dd9
16 changed files with 139 additions and 69 deletions
@@ -95,9 +95,17 @@ public class RepoDatabaseHelper extends SQLiteOpenHelper {
}
public Cursor getRepoCursor() {
String orderBy = null;
switch (mm.repoOrder) {
case Const.Value.ORDER_NAME:
orderBy = "name COLLATE NOCASE";
break;
case Const.Value.ORDER_DATE:
orderBy = "last_update DESC";
}
return mDb.query(TABLE_NAME, null, "minMagisk<=?",
new String[] { String.valueOf(mm.magiskVersionCode) },
null, null, "name COLLATE NOCASE");
null, null, orderBy);
}
public List<String> getRepoIDList() {