Skip to content

armgit / ente

Public Imported from GitHub
0

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

[mob][photos] Don't use spinner in people section

laurenspriembb9c0673a847
diff --git a/mobile/lib/ui/viewer/people/person_cluster_suggestion.dart b/mobile/lib/ui/viewer/people/person_cluster_suggestion.dart
index 48e9ed44a2..6b15f9d700 100644
--- a/mobile/lib/ui/viewer/people/person_cluster_suggestion.dart
+++ b/mobile/lib/ui/viewer/people/person_cluster_suggestion.dart
@@ -209,7 +209,8 @@ class _PersonClustersState extends State<PersonReviewClusterSuggestion> {
"ClusterID: $clusterID, Distance: ${distance.toStringAsFixed(3)}, usingMean: $usingMean",
style: getEnteTextTheme(context).smallMuted,
),
- Text( // TODO: come up with a better copy for strings below!
+ Text(
+ // TODO: come up with a better copy for strings below!
files.length > 1
? "Do these photos belong to ${widget.person.data.name}?"
: "Does this photo belong to ${widget.person.data.name}?",
@@ -328,6 +329,7 @@ class _PersonClustersState extends State<PersonReviewClusterSuggestion> {
files[start + index],
clusterID: cluserId,
useFullFile: false,
+ thumbnailFallback: false,
),
),
),
diff --git a/mobile/lib/ui/viewer/search/result/person_face_widget.dart b/mobile/lib/ui/viewer/search/result/person_face_widget.dart
index 344a91005f..b2e0005081 100644
--- a/mobile/lib/ui/viewer/search/result/person_face_widget.dart
+++ b/mobile/lib/ui/viewer/search/result/person_face_widget.dart
@@ -10,7 +10,7 @@ import "package:photos/face/model/person.dart";
import 'package:photos/models/file/file.dart';
import "package:photos/services/machine_learning/face_ml/person/person_service.dart";
import "package:photos/ui/common/loading_widget.dart";
-// import 'package:photos/ui/viewer/file/thumbnail_widget.dart';
+import "package:photos/ui/viewer/file/thumbnail_widget.dart";
import "package:photos/ui/viewer/file_details/face_widget.dart";
import "package:photos/ui/viewer/people/cropped_face_image_view.dart";
import "package:photos/utils/face/face_box_crop.dart";
@@ -21,6 +21,7 @@ class PersonFaceWidget extends StatelessWidget {
final String? personId;
final int? clusterID;
final bool useFullFile;
+ final bool thumbnailFallback;
// PersonFaceWidget constructor checks that both personId and clusterID are not null
// and that the file is not null
@@ -29,6 +30,7 @@ class PersonFaceWidget extends StatelessWidget {
this.personId,
this.clusterID,
this.useFullFile = true,
+ this.thumbnailFallback = true,
Key? key,
}) : assert(
personId != null || clusterID != null,
@@ -57,7 +59,9 @@ class PersonFaceWidget extends StatelessWidget {
if (snapshot.hasError) {
log('Error getting cover face for person: ${snapshot.error}');
}
- return const EnteLoadingWidget();
+ return thumbnailFallback
+ ? ThumbnailWidget(file)
+ : const EnteLoadingWidget();
}
},
);
@@ -77,7 +81,9 @@ class PersonFaceWidget extends StatelessWidget {
if (snapshot.hasError) {
log('Error getting cover face for person: ${snapshot.error}');
}
- return const EnteLoadingWidget();
+ return thumbnailFallback
+ ? ThumbnailWidget(file)
+ : const EnteLoadingWidget();
}
},
);