[mob][photos] Method for hiding cluster
This commit is contained in:
parent
7e60e8532f
commit
5c1bc220e9
2 changed files with 12 additions and 1 deletions
|
@ -293,6 +293,12 @@ class ClusterFeedbackService {
|
|||
return true;
|
||||
}
|
||||
|
||||
Future<void> hideCluster(int clusterID) async {
|
||||
await PersonService.instance.addPerson('hidden', clusterID, isHidden: true);
|
||||
Bus.instance.fire(PeopleChangedEvent());
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO: iterate over this method to find sweet spot
|
||||
Future<Map<int, List<String>>> breakUpCluster(
|
||||
int clusterID, {
|
||||
|
|
|
@ -156,7 +156,11 @@ class PersonService {
|
|||
return result;
|
||||
}
|
||||
|
||||
Future<PersonEntity> addPerson(String name, int clusterID) async {
|
||||
Future<PersonEntity> addPerson(
|
||||
String name,
|
||||
int clusterID, {
|
||||
bool isHidden = false,
|
||||
}) async {
|
||||
final faceIds = await faceMLDataDB.getFaceIDsForCluster(clusterID);
|
||||
final data = PersonData(
|
||||
name: name,
|
||||
|
@ -166,6 +170,7 @@ class PersonService {
|
|||
faces: faceIds.toSet(),
|
||||
),
|
||||
],
|
||||
isHidden: isHidden,
|
||||
);
|
||||
final result = await entityService.addOrUpdate(
|
||||
EntityType.person,
|
||||
|
|
Loading…
Add table
Reference in a new issue