[mob] Fix face cluster suggestion
This commit is contained in:
@@ -545,13 +545,14 @@ class FaceMLDataDB {
|
||||
final db = instance.database;
|
||||
return db.then((db) async {
|
||||
final List<Map<String, dynamic>> maps = await db.rawQuery(
|
||||
'SELECT $cluserIDColumn, $fileIDColumn FROM $facesTable '
|
||||
'WHERE $cluserIDColumn IN (${clusterIDs.join(",")})',
|
||||
'SELECT $fcClusterID, $fcFaceId FROM $faceClustersTable '
|
||||
'WHERE $fcClusterID IN (${clusterIDs.join(",")})',
|
||||
);
|
||||
final Map<int, Set<int>> result = {};
|
||||
for (final map in maps) {
|
||||
final clusterID = map[cluserIDColumn] as int;
|
||||
final fileID = map[fileIDColumn] as int;
|
||||
final clusterID = map[fcClusterID] as int;
|
||||
final faceId = map[fcFaceId] as String;
|
||||
final fileID = int.parse(faceId.split("_").first);
|
||||
result[fileID] = (result[fileID] ?? {})..add(clusterID);
|
||||
}
|
||||
return result;
|
||||
|
||||
@@ -186,6 +186,7 @@ class _FaceDebugSectionWidgetState extends State<FaceDebugSectionWidget> {
|
||||
pressedColor: getEnteColorScheme(context).fillFaint,
|
||||
trailingIcon: Icons.chevron_right_outlined,
|
||||
trailingIconIsMuted: true,
|
||||
alwaysShowSuccessState: true,
|
||||
onTap: () async {
|
||||
await showChoiceDialog(
|
||||
context,
|
||||
|
||||
Reference in New Issue
Block a user