Skip to content

armgit / ente

Public Imported from GitHub
0

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

[mob][photos] Rename "hidden" to "ignored"

laurenspriem319dc055dec6
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 36174cc500..c9303c3071 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<void> hideCluster(int clusterID) async {
- await PersonService.instance.addPerson('(hidden)', clusterID, isHidden: true);
+ Future<void> 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 9c9e0f8230..769291d718 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<ClusterAppBar> {
@@ -110,8 +110,8 @@ class _AppBarWidgetState extends State<ClusterAppBar> {
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<ClusterAppBar> {
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<ClusterAppBar> {
}
}
- Future<void> _onHideClusterClicked(BuildContext context) async {
+ Future<void> _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 8e977cd683..5454370488 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<PeopleAppBar> {
@@ -214,14 +213,14 @@ class _AppBarWidgetState extends State<PeopleAppBar> {
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<PeopleAppBar> {
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<PeopleAppBar> {
return actions;
}
- Future<void> _unhidePerson(BuildContext context) async {
+ Future<void> _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<PeopleAppBar> {
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);
}
},