diff --git a/mobile/lib/db/files_db.dart b/mobile/lib/db/files_db.dart index b9f7328e50e33f19e09e2f8f5c8ba61a277dbb8b..2fe4f5db603844f890f770f23670ab9cadebd441 100644 --- a/mobile/lib/db/files_db.dart +++ b/mobile/lib/db/files_db.dart @@ -736,7 +736,7 @@ class FilesDB { if (durations.isEmpty) { return []; } - final db = await instance.database; + final db = await instance.sqliteAsyncDB; String whereClause = "( "; for (int index = 0; index < durations.length; index++) { whereClause += "($columnCreationTime >= " + @@ -751,11 +751,12 @@ class FilesDB { } } whereClause += ")"; - final results = await db.query( - filesTable, - where: whereClause, - orderBy: '$columnCreationTime ' + order, + final query = + 'SELECT * FROM $filesTable WHERE $whereClause ORDER BY $columnCreationTime $order'; + final results = await db.getAll( + query, ); + final files = convertToFiles(results); return applyDBFilters( files,