[mob][photos] unawait network call when accepting suggestion

This commit is contained in:
laurenspriem 2024-04-24 08:39:45 +05:30
parent 7312633e02
commit efb1170b44
2 changed files with 8 additions and 5 deletions

View file

@ -61,7 +61,7 @@ class EntityService {
}) async {
final key = await getOrCreateEntityKey(type);
final encryptedKeyData = await CryptoUtil.encryptChaCha(
utf8.encode(plainText) as Uint8List,
utf8.encode(plainText),
key,
);
final String encryptedData =

View file

@ -1,3 +1,4 @@
import "dart:async" show unawaited;
import "dart:convert";
import "package:flutter/foundation.dart";
@ -102,10 +103,12 @@ class PersonService {
faces: faceIds.toSet(),
);
personData.assigned!.add(clusterInfo);
await entityService.addOrUpdate(
EntityType.person,
json.encode(personData.toJson()),
id: personID,
unawaited(
entityService.addOrUpdate(
EntityType.person,
json.encode(personData.toJson()),
id: personID,
),
);
await faceMLDataDB.assignClusterToPerson(
personID: personID,