π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Hide search tab item counts
ashil-pilot2005237b65bc
diff --git a/mobile/apps/photos/lib/ui/viewer/search_tab/contacts_section.dart b/mobile/apps/photos/lib/ui/viewer/search_tab/contacts_section.dartindex b0a5950a2f..c4a34d95cf 100644--- a/mobile/apps/photos/lib/ui/viewer/search_tab/contacts_section.dart+++ b/mobile/apps/photos/lib/ui/viewer/search_tab/contacts_section.dart@@ -199,7 +199,6 @@ class _ContactsSectionState extends State<ContactsSection> {class ContactRecommendation extends StatefulWidget {static const _avatarSize = 62.0;- static const _minHeight = 92.0;final GenericSearchResult contactSearchResult;const ContactRecommendation(this.contactSearchResult, {super.key});@@ -227,38 +226,33 @@ class _ContactRecommendationState extends State<ContactRecommendation> {routeToPage(context, ContactResultPage(widget.contactSearchResult));}},- child: ConstrainedBox(- constraints: const BoxConstraints(- minHeight: ContactRecommendation._minHeight,- ),- child: SizedBox(- width: 92,- child: Column(- mainAxisSize: MainAxisSize.min,- crossAxisAlignment: CrossAxisAlignment.center,- children: [- ClipOval(- child: SizedBox(- width: ContactRecommendation._avatarSize,- height: ContactRecommendation._avatarSize,- child: ContactAvatarWidget(- contactUserId: contactUserId,- email: contactEmail,- personId: personId,- size: ContactRecommendation._avatarSize,- ),+ child: SizedBox(+ width: 92,+ child: Column(+ mainAxisSize: MainAxisSize.min,+ crossAxisAlignment: CrossAxisAlignment.center,+ children: [+ ClipOval(+ child: SizedBox(+ width: ContactRecommendation._avatarSize,+ height: ContactRecommendation._avatarSize,+ child: ContactAvatarWidget(+ contactUserId: contactUserId,+ email: contactEmail,+ personId: personId,+ size: ContactRecommendation._avatarSize,),),- const SizedBox(height: 10),- Text(- widget.contactSearchResult.name(),- style: TextStyles.mini.copyWith(color: colors.textBase),- maxLines: 1,- overflow: TextOverflow.ellipsis,- textAlign: TextAlign.center,- ),- ],- ),+ ),+ const SizedBox(height: 10),+ Text(+ widget.contactSearchResult.name(),+ style: TextStyles.mini.copyWith(color: colors.textBase),+ maxLines: 1,+ overflow: TextOverflow.ellipsis,+ textAlign: TextAlign.center,+ ),+ ],),),);diff --git a/mobile/apps/photos/lib/ui/viewer/search_tab/locations_section.dart b/mobile/apps/photos/lib/ui/viewer/search_tab/locations_section.dartindex dffd722aa1..195a21e4db 100644--- a/mobile/apps/photos/lib/ui/viewer/search_tab/locations_section.dart+++ b/mobile/apps/photos/lib/ui/viewer/search_tab/locations_section.dart@@ -138,7 +138,6 @@ class _LocationsSectionState extends State<LocationsSection> {class LocationRecommendation extends StatelessWidget {static const width = 108.0;- static const _minHeight = 158.0;static const outerCornerRadius = 20.0;static const cornerSmoothing = 1.0;static const sideOfThumbnail = 108.0;@@ -161,91 +160,77 @@ class LocationRecommendation extends StatelessWidget {}},child: RepaintBoundary(- child: ConstrainedBox(- constraints: const BoxConstraints(minHeight: _minHeight),- child: SizedBox(- width: width,- child: Column(- mainAxisSize: MainAxisSize.min,- crossAxisAlignment: CrossAxisAlignment.start,- children: [- Stack(- children: [- ClipSmoothRect(- radius: SmoothBorderRadius(- cornerRadius: outerCornerRadius,- cornerSmoothing: cornerSmoothing,- ),- child: SizedBox(- width: sideOfThumbnail,- height: sideOfThumbnail,- child: locationSearchResult.previewThumbnail() != null- ? Hero(- tag: heroTag,- child: ThumbnailWidget(- locationSearchResult.previewThumbnail()!,- shouldShowSyncStatus: false,- shouldShowFavoriteIcon: false,- ),- )- : const NoThumbnailWidget(),- ),+ child: SizedBox(+ width: width,+ child: Column(+ mainAxisSize: MainAxisSize.min,+ crossAxisAlignment: CrossAxisAlignment.start,+ children: [+ Stack(+ children: [+ ClipSmoothRect(+ radius: SmoothBorderRadius(+ cornerRadius: outerCornerRadius,+ cornerSmoothing: cornerSmoothing,),- Positioned(- left: 8,- bottom: 8,- child: Stack(- clipBehavior: Clip.none,- alignment: Alignment.center,- children: [- ClipOval(- child: Container(- color: const Color.fromRGBO(0, 0, 0, 0.6),- width: 15,- height: 15,- ),- ),- Container(- width: 16,- height: 16,- decoration: BoxDecoration(- shape: BoxShape.circle,- border: Border.all(- width: 0.5,- color: strokeSolidMutedLight,+ child: SizedBox(+ width: sideOfThumbnail,+ height: sideOfThumbnail,+ child: locationSearchResult.previewThumbnail() != null+ ? Hero(+ tag: heroTag,+ child: ThumbnailWidget(+ locationSearchResult.previewThumbnail()!,+ shouldShowSyncStatus: false,+ shouldShowFavoriteIcon: false,),- ),+ )+ : const NoThumbnailWidget(),+ ),+ ),+ Positioned(+ left: 8,+ bottom: 8,+ child: Stack(+ clipBehavior: Clip.none,+ alignment: Alignment.center,+ children: [+ ClipOval(+ child: Container(+ color: const Color.fromRGBO(0, 0, 0, 0.6),+ width: 15,+ height: 15,),- const Icon(- Icons.location_on_sharp,- color: Colors.white,- size: 11,+ ),+ Container(+ width: 16,+ height: 16,+ decoration: BoxDecoration(+ shape: BoxShape.circle,+ border: Border.all(+ width: 0.5,+ color: strokeSolidMutedLight,+ ),),- ],- ),+ ),+ const Icon(+ Icons.location_on_sharp,+ color: Colors.white,+ size: 11,+ ),+ ],),- ],- ),- const SizedBox(height: 8),- Text(- locationSearchResult.name(),- style: TextStyles.body.copyWith(color: textTheme.body.color),- maxLines: 1,- overflow: TextOverflow.ellipsis,- ),- const SizedBox(height: 2),- Text(- AppLocalizations.of(- context,- ).itemCount(count: locationSearchResult.fileCount()),- style: TextStyles.mini.copyWith(- color: textTheme.miniMuted.color,),- maxLines: 1,- overflow: TextOverflow.ellipsis,- ),- ],- ),+ ],+ ),+ const SizedBox(height: 8),+ Text(+ locationSearchResult.name(),+ style: TextStyles.body.copyWith(color: textTheme.body.color),+ maxLines: 1,+ overflow: TextOverflow.ellipsis,+ ),+ ],),),),diff --git a/mobile/apps/photos/lib/ui/viewer/search_tab/magic_section.dart b/mobile/apps/photos/lib/ui/viewer/search_tab/magic_section.dartindex f016969cf3..72c8affd85 100644--- a/mobile/apps/photos/lib/ui/viewer/search_tab/magic_section.dart+++ b/mobile/apps/photos/lib/ui/viewer/search_tab/magic_section.dart@@ -4,7 +4,6 @@ import "package:ente_components/ente_components.dart";import "package:figma_squircle/figma_squircle.dart";import "package:flutter/material.dart";import "package:photos/events/event.dart";-import "package:photos/generated/l10n.dart";import "package:photos/models/search/generic_search_result.dart";import "package:photos/models/search/recent_searches.dart";import "package:photos/models/search/search_types.dart";@@ -132,7 +131,6 @@ class _MagicSectionState extends State<MagicSection> {class MagicRecommendation extends StatelessWidget {static const _width = 108.0;- static const _minHeight = 158.0;static const _thumbnailSize = 108.0;static const _cornerRadius = 20.0;static const _cornerSmoothing = 1.0;@@ -151,53 +149,39 @@ class MagicRecommendation extends StatelessWidget {magicSearchResult.onResultTap!(context);},- child: ConstrainedBox(- constraints: const BoxConstraints(minHeight: _minHeight),- child: SizedBox(- width: _width,- child: Column(- mainAxisSize: MainAxisSize.min,- crossAxisAlignment: CrossAxisAlignment.start,- children: [- ClipSmoothRect(- radius: SmoothBorderRadius(- cornerRadius: _cornerRadius,- cornerSmoothing: _cornerSmoothing,- ),- child: SizedBox(- width: _thumbnailSize,- height: _thumbnailSize,- child: magicSearchResult.previewThumbnail() != null- ? Hero(- tag: heroTag,- child: ThumbnailWidget(- magicSearchResult.previewThumbnail()!,- shouldShowSyncStatus: false,- ),- )- : const NoThumbnailWidget(),- ),- ),- const SizedBox(height: 8),- Text(- magicSearchResult.name(),- style: TextStyles.body.copyWith(color: textTheme.body.color),- maxLines: 1,- overflow: TextOverflow.ellipsis,+ child: SizedBox(+ width: _width,+ child: Column(+ mainAxisSize: MainAxisSize.min,+ crossAxisAlignment: CrossAxisAlignment.start,+ children: [+ ClipSmoothRect(+ radius: SmoothBorderRadius(+ cornerRadius: _cornerRadius,+ cornerSmoothing: _cornerSmoothing,),- const SizedBox(height: 2),- Text(- AppLocalizations.of(- context,- ).itemCount(count: magicSearchResult.fileCount()),- style: TextStyles.mini.copyWith(- color: textTheme.miniMuted.color,- ),- maxLines: 1,- overflow: TextOverflow.ellipsis,+ child: SizedBox(+ width: _thumbnailSize,+ height: _thumbnailSize,+ child: magicSearchResult.previewThumbnail() != null+ ? Hero(+ tag: heroTag,+ child: ThumbnailWidget(+ magicSearchResult.previewThumbnail()!,+ shouldShowSyncStatus: false,+ ),+ )+ : const NoThumbnailWidget(),),- ],- ),+ ),+ const SizedBox(height: 8),+ Text(+ magicSearchResult.name(),+ style: TextStyles.body.copyWith(color: textTheme.body.color),+ maxLines: 1,+ overflow: TextOverflow.ellipsis,+ ),+ ],),),);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 f42f916938..30d47373ee 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@@ -146,8 +146,6 @@ class _PeopleSectionState extends State<PeopleSection> {}class SearchExampleRow extends StatelessWidget {- static const _minTileHeight = 158.0;-final SectionType sectionType;final List<GenericSearchResult> examples;@@ -159,13 +157,7 @@ class SearchExampleRow extends StatelessWidget {spacing: 10,children: [for (final example in examples)- ConstrainedBox(- constraints: const BoxConstraints(minHeight: _minTileHeight),- child: PersonSearchExample(- searchResult: example,- selectedPeople: null,- ),- ),+ PersonSearchExample(searchResult: example, selectedPeople: null),],);}@@ -338,7 +330,6 @@ class PersonSearchExample extends StatelessWidget {padding: EdgeInsets.zero,child: _PersonLabel(name: searchResult.name(),- count: searchResult.fileCount(),width: size,),),@@ -351,14 +342,9 @@ class PersonSearchExample extends StatelessWidget {}class _PersonLabel extends StatelessWidget {- const _PersonLabel({- required this.name,- required this.count,- required this.width,- });+ const _PersonLabel({required this.name, required this.width});final String name;- final int count;final double width;@override@@ -377,13 +363,6 @@ class _PersonLabel extends StatelessWidget {overflow: TextOverflow.ellipsis,style: TextStyles.body.copyWith(color: textTheme.body.color),),- const SizedBox(height: 2),- Text(- AppLocalizations.of(context).itemCount(count: count),- maxLines: 1,- overflow: TextOverflow.ellipsis,- style: TextStyles.mini.copyWith(color: textTheme.miniMuted.color),- ),],),),