π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Resize face widgets shown across the app for better perf
ashilknb6d17cb58cf7
diff --git a/mobile/apps/photos/lib/ui/viewer/search/result/people_section_all_page.dart b/mobile/apps/photos/lib/ui/viewer/search/result/people_section_all_page.dartindex 412deb91a7..48a75a2472 100644--- a/mobile/apps/photos/lib/ui/viewer/search/result/people_section_all_page.dart+++ b/mobile/apps/photos/lib/ui/viewer/search/result/people_section_all_page.dart@@ -194,6 +194,7 @@ class SelectablePersonSearchExample extends StatelessWidget {): FaceSearchResult(searchResult,+ displaySize: size - 2,isDefaultFace: isDefaultFace,);} else {@@ -305,10 +306,12 @@ class SelectablePersonSearchExample extends StatelessWidget {class FaceSearchResult extends StatelessWidget {final SearchResult searchResult;+ final double displaySize;final bool isDefaultFace;const FaceSearchResult(this.searchResult, {+ required this.displaySize,super.key,this.isDefaultFace = false,});@@ -316,9 +319,12 @@ class FaceSearchResult extends StatelessWidget {@overrideWidget build(BuildContext context) {final params = (searchResult as GenericSearchResult).params;+ final int cachedPixelWidth =+ (displaySize * MediaQuery.devicePixelRatioOf(context)).toInt();return PersonFaceWidget(personId: params[kPersonParamID],clusterID: params[kClusterParamId],+ cachedPixelWidth: cachedPixelWidth,key: params.containsKey(kPersonWidgetKey)? ValueKey(params[kPersonWidgetKey]): ValueKey(params[kPersonParamID] ?? params[kClusterParamId]),diff --git a/mobile/apps/photos/lib/ui/viewer/search_tab/people_section.dart b/mobile/apps/photos/lib/ui/viewer/search_tab/people_section.dartindex 8a756510c0..76f565be5c 100644--- a/mobile/apps/photos/lib/ui/viewer/search_tab/people_section.dart+++ b/mobile/apps/photos/lib/ui/viewer/search_tab/people_section.dart@@ -261,7 +261,10 @@ class PersonSearchExample extends StatelessWidget {searchResult.previewThumbnail()!,shouldShowSyncStatus: false,)- : FaceSearchResult(searchResult);+ : FaceSearchResult(+ searchResult,+ displaySize: size - 2,+ );} else {child = const NoThumbnailWidget(addBorder: false,@@ -368,15 +371,23 @@ class PersonSearchExample extends StatelessWidget {class FaceSearchResult extends StatelessWidget {final SearchResult searchResult;+ final double displaySize;- const FaceSearchResult(this.searchResult, {super.key});+ const FaceSearchResult(+ this.searchResult, {+ required this.displaySize,+ super.key,+ });@overrideWidget build(BuildContext context) {final params = (searchResult as GenericSearchResult).params;+ final int cachedPixelWidth =+ (displaySize * MediaQuery.devicePixelRatioOf(context)).toInt();return PersonFaceWidget(personId: params[kPersonParamID],clusterID: params[kClusterParamId],+ cachedPixelWidth: cachedPixelWidth,key: params.containsKey(kPersonWidgetKey)? ValueKey(params[kPersonWidgetKey]): ValueKey(params[kPersonParamID] ?? params[kClusterParamId]),