Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[mob] Use async sqlite for getting faceID from cluster

laurenspriem74247c4563bd
diff --git a/mobile/lib/face/db.dart b/mobile/lib/face/db.dart
index bd95d0f942..bcff08762e 100644
--- a/mobile/lib/face/db.dart
+++ b/mobile/lib/face/db.dart
@@ -335,12 +335,11 @@ class FaceMLDataDB {
}
Future<Iterable<String>> getFaceIDsForCluster(int clusterID) async {
- final db = await instance.database;
- final List<Map<String, dynamic>> maps = await db.query(
- faceClustersTable,
- columns: [fcFaceId],
- where: '$fcClusterID = ?',
- whereArgs: [clusterID],
+ final db = await instance.sqliteAsyncDB;
+ final List<Map<String, dynamic>> maps = await db.getAll(
+ 'SELECT $fcFaceId FROM $faceClustersTable '
+ 'WHERE $faceClustersTable.$fcClusterID = ?',
+ [clusterID],
);
return maps.map((e) => e[fcFaceId] as String).toSet();
}