Public Access
feat(database): return newest journeys first
This commit is contained in:
@@ -236,7 +236,12 @@ class Journey {
|
||||
static Future<List<Journey>> dbGetAll({int num = 40, int offset = 0}) async {
|
||||
//final batch = DbHelper.db.batch; // later
|
||||
Database database = DbHelper.db;
|
||||
var tmp = await database.query(tableName, limit: num, offset: offset);
|
||||
var tmp = await database.query(
|
||||
tableName,
|
||||
limit: num,
|
||||
offset: offset,
|
||||
orderBy: 'id DESC',
|
||||
);
|
||||
Future<List<Journey>> journeys = Future.wait(
|
||||
tmp.map((jour) => fromMapWrapper(jour)),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user