π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[mob][photos] Make faces loading in file info less ugly
laurenspriem288adb2e7c3f
diff --git a/mobile/lib/ui/components/info_item_widget.dart b/mobile/lib/ui/components/info_item_widget.dartindex 5bec95ccfc..73517e0520 100644--- a/mobile/lib/ui/components/info_item_widget.dart+++ b/mobile/lib/ui/components/info_item_widget.dart@@ -11,6 +11,7 @@ class InfoItemWidget extends StatelessWidget {final Widget? endSection;final Future<List<Widget>> subtitleSection;final bool hasChipButtons;+ final bool biggerSpinner;final VoidCallback? onTap;const InfoItemWidget({required this.leadingIcon,@@ -19,6 +20,7 @@ class InfoItemWidget extends StatelessWidget {this.endSection,required this.subtitleSection,this.hasChipButtons = false,+ this.biggerSpinner = false,this.onTap,super.key,});@@ -57,10 +59,11 @@ class InfoItemWidget extends StatelessWidget {}} else {child = EnteLoadingWidget(- padding: 3,- size: 11,+ padding: biggerSpinner ? 6 : 3,+ size: biggerSpinner ? 20 : 11,color: getEnteColorScheme(context).strokeMuted,- alignment: Alignment.centerLeft,+ alignment:+ biggerSpinner ? Alignment.center : Alignment.centerLeft,);}return AnimatedSwitcher(diff --git a/mobile/lib/ui/viewer/file_details/faces_item_widget.dart b/mobile/lib/ui/viewer/file_details/faces_item_widget.dartindex e360897492..5df5e66556 100644--- a/mobile/lib/ui/viewer/file_details/faces_item_widget.dart+++ b/mobile/lib/ui/viewer/file_details/faces_item_widget.dart@@ -40,6 +40,7 @@ class _FacesItemWidgetState extends State<FacesItemWidget> {leadingIcon: Icons.face_retouching_natural_outlined,subtitleSection: _faceWidgets(context, widget.file, editMode),hasChipButtons: true,+ biggerSpinner: true,editOnTap: _toggleEditMode,);}@@ -140,6 +141,10 @@ class _FacesItemWidgetState extends State<FacesItemWidget> {final lastViewedClusterID = ClusterFeedbackService.lastViewedClusterID;final faceWidgets = <FaceWidget>[];++ // await generation of the face crops here, so that the file info shows one central loading spinner+ final test = await getRelevantFaceCrops(faces);+final faceCrops = getRelevantFaceCrops(faces);for (final Face face in faces) {final int? clusterID = faceIdsToClusterIds[face.faceID];