diff --git a/mobile/lib/services/machine_learning/face_ml/feedback/cluster_feedback.dart b/mobile/lib/services/machine_learning/face_ml/feedback/cluster_feedback.dart index 36174cc50..c9303c307 100644 --- a/mobile/lib/services/machine_learning/face_ml/feedback/cluster_feedback.dart +++ b/mobile/lib/services/machine_learning/face_ml/feedback/cluster_feedback.dart @@ -293,8 +293,9 @@ class ClusterFeedbackService { return true; } - Future hideCluster(int clusterID) async { - await PersonService.instance.addPerson('(hidden)', clusterID, isHidden: true); + Future ignoreCluster(int clusterID) async { + await PersonService.instance + .addPerson('(ignored)', clusterID, isHidden: true); Bus.instance.fire(PeopleChangedEvent()); return; } diff --git a/mobile/lib/ui/viewer/people/cluster_app_bar.dart b/mobile/lib/ui/viewer/people/cluster_app_bar.dart index 9c9e0f823..769291d71 100644 --- a/mobile/lib/ui/viewer/people/cluster_app_bar.dart +++ b/mobile/lib/ui/viewer/people/cluster_app_bar.dart @@ -45,7 +45,7 @@ class ClusterAppBar extends StatefulWidget { enum ClusterPopupAction { setCover, breakupCluster, - hide, + ignore, } class _AppBarWidgetState extends State { @@ -110,8 +110,8 @@ class _AppBarWidgetState extends State { items.addAll( [ EntePopupMenuItem( - "Hide person", - value: ClusterPopupAction.hide, + "Ignore person", + value: ClusterPopupAction.ignore, icon: Icons.hide_image_outlined, ), EntePopupMenuItem( @@ -132,8 +132,8 @@ class _AppBarWidgetState extends State { if (value == ClusterPopupAction.breakupCluster) { // ignore: unawaited_futures await _breakUpCluster(context); - } else if (value == ClusterPopupAction.hide) { - await _onHideClusterClicked(context); + } else if (value == ClusterPopupAction.ignore) { + await _onIgnoredClusterClicked(context); } // else if (value == ClusterPopupAction.setCover) { // await setCoverPhoto(context); @@ -197,19 +197,19 @@ class _AppBarWidgetState extends State { } } - Future _onHideClusterClicked(BuildContext context) async { + Future _onIgnoredClusterClicked(BuildContext context) async { await showChoiceDialog( context, - title: "Are you sure you want to hide this person?", + title: "Are you sure you want to ignore this person?", body: - "The person will not be displayed in the discovery tap anymore. You can unhide the person by going to the hidden person grouping from the file info of one of the photos.", + "The person grouping will not be displayed in the discovery tap anymore. Photos will remain untouched.", firstButtonLabel: "Yes, confirm", firstButtonOnTap: () async { try { - await ClusterFeedbackService.instance.hideCluster(widget.clusterID); + await ClusterFeedbackService.instance.ignoreCluster(widget.clusterID); Navigator.of(context).pop(); // Close the cluster page } catch (e, s) { - _logger.severe('Hiding a cluster failed', e, s); + _logger.severe('Ignoring a cluster failed', e, s); // await showGenericErrorDialog(context: context, error: e); } }, diff --git a/mobile/lib/ui/viewer/people/people_app_bar.dart b/mobile/lib/ui/viewer/people/people_app_bar.dart index 8e977cd68..545437048 100644 --- a/mobile/lib/ui/viewer/people/people_app_bar.dart +++ b/mobile/lib/ui/viewer/people/people_app_bar.dart @@ -47,8 +47,7 @@ enum PeoplPopupAction { remove, viewPhotos, confirmPhotos, - hide, - unhide, + unignore, } class _AppBarWidgetState extends State { @@ -214,14 +213,14 @@ class _AppBarWidgetState extends State { items.addAll( [ const PopupMenuItem( - value: PeoplPopupAction.unhide, + value: PeoplPopupAction.unignore, child: Row( children: [ Icon(Icons.visibility_outlined), Padding( padding: EdgeInsets.all(8), ), - Text("Unhide person"), + Text("Show person"), ], ), ), @@ -259,10 +258,8 @@ class _AppBarWidgetState extends State { await _renameAlbum(context); } else if (value == PeoplPopupAction.setCover) { await setCoverPhoto(context); - } else if (value == PeoplPopupAction.hide) { - // ignore: unawaited_futures - } else if (value == PeoplPopupAction.unhide) { - await _unhidePerson(context); + } else if (value == PeoplPopupAction.unignore) { + await _showPerson(context); } else if (value == PeoplPopupAction.remove) { await PersonService.instance.deletePerson(widget.person.remoteID); } @@ -274,12 +271,12 @@ class _AppBarWidgetState extends State { return actions; } - Future _unhidePerson(BuildContext context) async { + Future _showPerson(BuildContext context) async { bool assignName = false; await showChoiceDialog( context, - title: "Are you sure you want to unhide this person?", - firstButtonLabel: "Yes, unhide person", + title: "Are you sure you want to show this person in people section again??", + firstButtonLabel: "Yes, show person", firstButtonOnTap: () async { try { await PersonService.instance @@ -287,7 +284,7 @@ class _AppBarWidgetState extends State { Bus.instance.fire(PeopleChangedEvent()); assignName = true; } catch (e, s) { - _logger.severe('Unhiding and naming person failed', e, s); + _logger.severe('Unignoring/showing and naming person failed', e, s); // await showGenericErrorDialog(context: context, error: e); } },