π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Use component text styles for tab headings
ashilkn19f104deb420
diff --git a/mobile/apps/photos/lib/ui/rituals/rituals_banner.dart b/mobile/apps/photos/lib/ui/rituals/rituals_banner.dartindex 79b21609c2..2cfeb709c4 100644--- a/mobile/apps/photos/lib/ui/rituals/rituals_banner.dart+++ b/mobile/apps/photos/lib/ui/rituals/rituals_banner.dart@@ -1,6 +1,7 @@import "dart:async";import "dart:math" as math;+import "package:ente_components/theme/text_styles.dart";import "package:ente_icons/ente_icons.dart";import "package:ente_pure_utils/ente_pure_utils.dart";import "package:flutter/material.dart";@@ -64,9 +65,11 @@ class RitualsBanner extends StatelessWidget {scrollDirection: Axis.horizontal,child: Row(children: [- for (final (index, item)- in _buildRowItems(context, rituals, summary)- .indexed) ...[+ for (final (index, item) in _buildRowItems(+ context,+ rituals,+ summary,+ ).indexed) ...[if (index != 0) const SizedBox(width: 10),item,],@@ -151,7 +154,9 @@ class _RitualsHeader extends StatelessWidget {padding: const EdgeInsets.all(12),child: Text(context.l10n.ritualsTitle,- style: textTheme.largeBold,+ style: TextStyles.h2.copyWith(+ color: textTheme.largeBold.color,+ ),),),if (showChevron)@@ -402,8 +407,9 @@ class _RitualCameraButton extends StatelessWidget {Widget build(BuildContext context) {final colorScheme = getEnteColorScheme(context);final isDark = Theme.of(context).brightness == Brightness.dark;- final borderColor =- isDark ? colorScheme.strokeFaint : Colors.black.withValues(alpha: 0.04);+ final borderColor = isDark+ ? colorScheme.strokeFaint+ : Colors.black.withValues(alpha: 0.04);return Tooltip(message: tooltip,child: Material(diff --git a/mobile/apps/photos/lib/ui/social/feed_screen.dart b/mobile/apps/photos/lib/ui/social/feed_screen.dartindex 1292b9f9ed..66154bc9df 100644--- a/mobile/apps/photos/lib/ui/social/feed_screen.dart+++ b/mobile/apps/photos/lib/ui/social/feed_screen.dart@@ -1,5 +1,6 @@import "dart:async";+import "package:ente_components/theme/text_styles.dart";import "package:ente_pure_utils/ente_pure_utils.dart";import "package:flutter/material.dart";import "package:logging/logging.dart";@@ -50,8 +51,9 @@ class FeedNavigationTarget {}final collectionID = int.tryParse(collectionRaw);if (collectionID == null) {- _logger- .warning("Invalid feed URI: invalid collectionID '$collectionRaw'");+ _logger.warning(+ "Invalid feed URI: invalid collectionID '$collectionRaw'",+ );return null;}FeedItemType type;@@ -66,8 +68,9 @@ class FeedNavigationTarget {? int.tryParse(fileIDRaw): null;final commentIDRaw = uri.queryParameters['commentID'];- final commentID =- commentIDRaw != null && commentIDRaw.isNotEmpty ? commentIDRaw : null;+ final commentID = commentIDRaw != null && commentIDRaw.isNotEmpty+ ? commentIDRaw+ : null;return FeedNavigationTarget(type: type,collectionID: collectionID,@@ -129,8 +132,9 @@ class _FeedScreenState extends State<FeedScreen> {if (widget.showBackButton) {_activateFeed();} else {- _tabChangedEventSubscription =- Bus.instance.on<TabChangedEvent>().listen((event) {+ _tabChangedEventSubscription = Bus.instance.on<TabChangedEvent>().listen((+ event,+ ) {if (event.selectedIndex == _kFeedTabIndex) {_activateFeed();}@@ -217,8 +221,8 @@ class _FeedScreenState extends State<FeedScreen> {Future<void> _syncAndRefresh() async {try {- final hasNewSocialData =- await FeedDataProvider.instance.syncAllSharedCollections();+ final hasNewSocialData = await FeedDataProvider.instance+ .syncAllSharedCollections();if (!mounted) return;if (!hasNewSocialData) return;@@ -235,7 +239,8 @@ class _FeedScreenState extends State<FeedScreen> {setState(() {_feedItems = freshItems;_anonDisplayNamesByCollection = freshAnonNames;- _hasMore = _currentLimit < _kMaxFeedLimit &&+ _hasMore =+ _currentLimit < _kMaxFeedLimit &&freshItems.length >= _currentLimit;});}@@ -366,8 +371,9 @@ class _FeedScreenState extends State<FeedScreen> {}var fileID = target.fileID;if (fileID == null && target.commentID != null) {- final comment =- await SocialDataProvider.instance.getCommentById(target.commentID!);+ final comment = await SocialDataProvider.instance.getCommentById(+ target.commentID!,+ );fileID = comment?.fileID;}if (fileID == null) return false;@@ -570,91 +576,95 @@ class _FeedScreenState extends State<FeedScreen> {AppLocalizations.of(context).feed,style: widget.showBackButton? textTheme.bodyBold- : textTheme.h4Bold,+ : TextStyles.h1Bold.copyWith(+ color: textTheme.h4Bold.color,+ ),),),body: _isLoading? const Center(child: EnteLoadingWidget(size: 24)): _feedItems.isEmpty- ? FeedEmptyState(- localGalleryMode: isLocalGalleryMode &&- !Configuration.instance.hasConfiguredAccount(),- )- : RefreshIndicator(- onRefresh: _onRefresh,- child: ListView.builder(- controller: _scrollController,- padding: EdgeInsets.only(- left: 15,- right: 15,- bottom: MediaQuery.paddingOf(context).bottom +- (widget.showBackButton ? 0 : 88),- ),- itemCount: _feedItems.length + (_isLoadingMore ? 1 : 0),- itemBuilder: (context, index) {- if (index >= _feedItems.length) {- return const Padding(- padding: EdgeInsets.symmetric(vertical: 16),- child: Center(- child: EnteLoadingWidget(size: 20),- ),- );- }- final item = _feedItems[index];- final isLastItem = index == _feedItems.length - 1;- final itemKey = _feedItemStableKey(item);- final heroTagPrefix = _heroTagPrefixForFeedItem(item);- final isForwardHeroSuppressed =- _suppressedForwardHeroPrefixes.contains(+ ? FeedEmptyState(+ localGalleryMode:+ isLocalGalleryMode &&+ !Configuration.instance.hasConfiguredAccount(),+ )+ : RefreshIndicator(+ onRefresh: _onRefresh,+ child: ListView.builder(+ controller: _scrollController,+ padding: EdgeInsets.only(+ left: 15,+ right: 15,+ bottom:+ MediaQuery.paddingOf(context).bottom ++ (widget.showBackButton ? 0 : 88),+ ),+ itemCount: _feedItems.length + (_isLoadingMore ? 1 : 0),+ itemBuilder: (context, index) {+ if (index >= _feedItems.length) {+ return const Padding(+ padding: EdgeInsets.symmetric(vertical: 16),+ child: Center(+ child: EnteLoadingWidget(size: 20),+ ),+ );+ }+ final item = _feedItems[index];+ final isLastItem = index == _feedItems.length - 1;+ final itemKey = _feedItemStableKey(item);+ final heroTagPrefix = _heroTagPrefixForFeedItem(item);+ final isForwardHeroSuppressed = _suppressedForwardHeroPrefixes+ .contains(heroTagPrefix,);- final key = _shouldUseNavigationTargetKey(item)- ? _navigationTargetItemKey- : ValueKey(itemKey);- return FeedItemWidget(- key: key,- feedItem: item,- heroTagPrefix: heroTagPrefix,- enableThumbnailHero: !isForwardHeroSuppressed,- currentUserID: _currentUserID,- anonDisplayNames:- _anonDisplayNamesByCollection[item.collectionID] ??- const {},- isLastItem: isLastItem,- onTap: () => _handleFeedItemTap(- item,- heroTagPrefix: heroTagPrefix,- ),- onSharedHeaderTap: () => _openSharedCollection(- item,- heroTagPrefix: heroTagPrefix,- jumpToFileID: _jumpFileIDForSharedCollection(- type: item.type,- sharedFileIDs: item.sharedFileIDs,- ),- ),- onSharedPhotoTap: (fileID) => _openSharedPhotos(- item,- initialFileID: fileID,- heroTagPrefix: heroTagPrefix,- ),- onSharedExtraCountTap: () => _openSharedCollection(- item,- jumpToFileID: _jumpFileIDForSharedCollection(- type: item.type,- sharedFileIDs: item.sharedFileIDs,- ),- ),- onPrimaryActorTap: (user) =>- openSocialActorContactDestination(+ final key = _shouldUseNavigationTargetKey(item)+ ? _navigationTargetItemKey+ : ValueKey(itemKey);+ return FeedItemWidget(+ key: key,+ feedItem: item,+ heroTagPrefix: heroTagPrefix,+ enableThumbnailHero: !isForwardHeroSuppressed,+ currentUserID: _currentUserID,+ anonDisplayNames:+ _anonDisplayNamesByCollection[item.collectionID] ??+ const {},+ isLastItem: isLastItem,+ onTap: () => _handleFeedItemTap(+ item,+ heroTagPrefix: heroTagPrefix,+ ),+ onSharedHeaderTap: () => _openSharedCollection(+ item,+ heroTagPrefix: heroTagPrefix,+ jumpToFileID: _jumpFileIDForSharedCollection(+ type: item.type,+ sharedFileIDs: item.sharedFileIDs,+ ),+ ),+ onSharedPhotoTap: (fileID) => _openSharedPhotos(+ item,+ initialFileID: fileID,+ heroTagPrefix: heroTagPrefix,+ ),+ onSharedExtraCountTap: () => _openSharedCollection(+ item,+ jumpToFileID: _jumpFileIDForSharedCollection(+ type: item.type,+ sharedFileIDs: item.sharedFileIDs,+ ),+ ),+ onPrimaryActorTap: (user) =>+ openSocialActorContactDestination(context,user,currentUserID: _currentUserID,),- );- },- ),- ),+ );+ },+ ),+ ),);}@@ -771,13 +781,15 @@ class _FeedScreenState extends State<FeedScreen> {var fileID = item.fileID;if (fileID == null && item.commentID != null) {- final comment =- await SocialDataProvider.instance.getCommentById(item.commentID!);+ final comment = await SocialDataProvider.instance.getCommentById(+ item.commentID!,+ );fileID = comment?.fileID;}if (fileID == null) return;- final shouldDisableForwardHero = disableForwardHero &&+ final shouldDisableForwardHero =+ disableForwardHero &&heroTagPrefix != null &&!_suppressedForwardHeroPrefixes.contains(heroTagPrefix);@@ -834,8 +846,9 @@ class _FeedScreenState extends State<FeedScreen> {var fileID = item.fileID;if (fileID == null && item.commentID != null) {- final comment =- await SocialDataProvider.instance.getCommentById(item.commentID!);+ final comment = await SocialDataProvider.instance.getCommentById(+ item.commentID!,+ );fileID = comment?.fileID;}@@ -882,8 +895,9 @@ class _FeedScreenState extends State<FeedScreen> {var initialIndex = 0;if (initialFileID != null) {- final tappedIndex =- files.indexWhere((file) => file.uploadedFileID == initialFileID);+ final tappedIndex = files.indexWhere(+ (file) => file.uploadedFileID == initialFileID,+ );if (tappedIndex >= 0) {initialIndex = tappedIndex;}diff --git a/mobile/apps/photos/lib/ui/tabs/albums_tab.dart b/mobile/apps/photos/lib/ui/tabs/albums_tab.dartindex 060e10c597..ae708ad2b4 100644--- a/mobile/apps/photos/lib/ui/tabs/albums_tab.dart+++ b/mobile/apps/photos/lib/ui/tabs/albums_tab.dart@@ -479,7 +479,9 @@ class _AlbumsTabState extends State<AlbumsTab>: Text(strings.albums,key: const ValueKey("albums_title"),- style: textTheme.h4Bold,+ style: TextStyles.h1Bold.copyWith(+ color: textTheme.h4Bold.color,+ ),),),),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 b66308d975..1e384f414c 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@@ -1,6 +1,7 @@import "dart:async";import "package:dotted_border/dotted_border.dart";+import "package:ente_components/theme/text_styles.dart";import "package:ente_pure_utils/ente_pure_utils.dart";import "package:flutter/material.dart";import "package:photos/core/constants.dart";@@ -41,10 +42,12 @@ class _ContactsSectionState extends State<ContactsSection> {streamSubscriptions.add(stream.listen((event) async {_debouncer.run(() async {- _contactSearchResults = (await SectionType.contacts.getData(- context,- limit: kSearchSectionLimit,- )) as List<GenericSearchResult>;+ _contactSearchResults =+ (await SectionType.contacts.getData(+ context,+ limit: kSearchSectionLimit,+ ))+ as List<GenericSearchResult>;setState(() {});});}),@@ -81,7 +84,9 @@ class _ContactsSectionState extends State<ContactsSection> {children: [Text(SectionType.contacts.sectionTitle(context),- style: textTheme.largeBold,+ style: TextStyles.h2.copyWith(+ color: textTheme.largeBold.color,+ ),),const SizedBox(height: 24),Padding(@@ -180,8 +185,10 @@ class _ContactRecommendationState extends State<ContactRecommendation> {minWidth: 100,),child: Padding(- padding:- const EdgeInsets.symmetric(horizontal: 4.25, vertical: 10.5),+ padding: const EdgeInsets.symmetric(+ horizontal: 4.25,+ vertical: 10.5,+ ),child: Column(crossAxisAlignment: CrossAxisAlignment.center,children: [@@ -241,8 +248,10 @@ class ContactCTA extends StatelessWidget {minWidth: 100,),child: Padding(- padding:- const EdgeInsets.symmetric(horizontal: 4.25, vertical: 10.5),+ padding: const EdgeInsets.symmetric(+ horizontal: 4.25,+ vertical: 10.5,+ ),child: Column(crossAxisAlignment: CrossAxisAlignment.center,children: [diff --git a/mobile/apps/photos/lib/ui/viewer/search_tab/file_type_section.dart b/mobile/apps/photos/lib/ui/viewer/search_tab/file_type_section.dartindex 6c9c544570..63dcd2246b 100644--- a/mobile/apps/photos/lib/ui/viewer/search_tab/file_type_section.dart+++ b/mobile/apps/photos/lib/ui/viewer/search_tab/file_type_section.dart@@ -1,5 +1,6 @@import "dart:async";+import "package:ente_components/theme/text_styles.dart";import "package:ente_pure_utils/ente_pure_utils.dart";import "package:flutter/material.dart";import "package:logging/logging.dart";@@ -35,14 +36,17 @@ class FileTypeSection extends StatelessWidget {children: [Text(SectionType.fileTypesAndExtension.sectionTitle(context),- style: textTheme.largeBold,+ style: TextStyles.h2.copyWith(+ color: textTheme.largeBold.color,+ ),),const SizedBox(height: 24),Padding(padding: const EdgeInsets.only(left: 4),child: Text(- SectionType.fileTypesAndExtension- .getEmptyStateText(context),+ SectionType.fileTypesAndExtension.getEmptyStateText(+ context,+ ),style: textTheme.smallMuted,),),@@ -138,15 +142,15 @@ class _FileTypeTile {required this.assetKey,required this.name,required FileType type,- }) : fileType = type,- extension = null;+ }) : fileType = type,+ extension = null;const _FileTypeTile.extension({required this.assetKey,required this.name,required this.extension,- }) : fileType = null,- assert(extension != null);+ }) : fileType = null,+ assert(extension != null);Future<GenericSearchResult> resolve() {final type = fileType;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 98799a1cec..40a4389f37 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@@ -3,6 +3,7 @@ import "dart:math";import "dart:ui";import "package:dotted_border/dotted_border.dart";+import "package:ente_components/theme/text_styles.dart";import "package:ente_pure_utils/ente_pure_utils.dart";import "package:figma_squircle/figma_squircle.dart";import "package:flutter/material.dart";@@ -46,10 +47,12 @@ class _LocationsSectionState extends State<LocationsSection> {for (Stream<Event> stream in streamsToListenTo) {streamSubscriptions.add(stream.listen((event) async {- _locationsSearchResults = (await SectionType.location.getData(- context,- limit: kSearchSectionLimit,- )) as List<GenericSearchResult>;+ _locationsSearchResults =+ (await SectionType.location.getData(+ context,+ limit: kSearchSectionLimit,+ ))+ as List<GenericSearchResult>;setState(() {});}),);@@ -84,7 +87,9 @@ class _LocationsSectionState extends State<LocationsSection> {children: [Text(SectionType.location.sectionTitle(context),- style: textTheme.largeBold,+ style: TextStyles.h2.copyWith(+ color: textTheme.largeBold.color,+ ),),const SizedBox(height: 24),Padding(@@ -158,7 +163,8 @@ class LocationRecommendation extends StatelessWidget {@overrideWidget build(BuildContext context) {- final heroTag = locationSearchResult.heroTag() ++ final heroTag =+ locationSearchResult.heroTag() +(locationSearchResult.previewThumbnail()?.tag ?? "");final enteTextTheme = getEnteTextTheme(context);return Padding(@@ -221,9 +227,12 @@ class LocationRecommendation extends StatelessWidget {Stack(children: [ImageFiltered(- imageFilter:- ImageFilter.blur(sigmaX: 24, sigmaY: 24),- child: locationSearchResult.previewThumbnail() !=+ imageFilter: ImageFilter.blur(+ sigmaX: 24,+ sigmaY: 24,+ ),+ child:+ locationSearchResult.previewThumbnail() !=null? ThumbnailWidget(locationSearchResult.previewThumbnail()!,@@ -258,18 +267,22 @@ class LocationRecommendation extends StatelessWidget {cornerSmoothing: cornerSmoothing,),child: Container(- color:- Colors.black.withValues(alpha: 0.1),- width: sideOfThumbnail ++ color: Colors.black.withValues(+ alpha: 0.1,+ ),+ width:+ sideOfThumbnail +thumbnailBorderWidth * 2,- height: sideOfThumbnail ++ height:+ sideOfThumbnail +thumbnailBorderWidth * 2,),),SizedBox(width: sideOfThumbnail,height: sideOfThumbnail,- child: locationSearchResult+ child:+ locationSearchResult.previewThumbnail() !=null? Hero(@@ -278,8 +291,8 @@ class LocationRecommendation extends StatelessWidget {radius: SmoothBorderRadius(cornerRadius:outerCornerRadius -- outerPadding -- thumbnailBorderWidth,+ outerPadding -+ thumbnailBorderWidth,cornerSmoothing:cornerSmoothing,),@@ -405,15 +418,18 @@ class GoToMapWithBG extends StatelessWidget {children: [ClipSmoothRect(radius: SmoothBorderRadius(- cornerRadius: LocationRecommendation.outerCornerRadius ++ cornerRadius:+ LocationRecommendation.outerCornerRadius +LocationRecommendation.outerStrokeWidth,cornerSmoothing: LocationRecommendation.cornerSmoothing,),child: Container(color: Colors.white.withValues(alpha: 0.1),- width: LocationRecommendation.width ++ width:+ LocationRecommendation.width +LocationRecommendation.outerStrokeWidth * 2,- height: LocationRecommendation.height ++ height:+ LocationRecommendation.height +LocationRecommendation.outerStrokeWidth * 2,),),@@ -515,15 +531,18 @@ class LocationCTA extends StatelessWidget {children: [ClipSmoothRect(radius: SmoothBorderRadius(- cornerRadius: LocationRecommendation.outerCornerRadius ++ cornerRadius:+ LocationRecommendation.outerCornerRadius +LocationRecommendation.outerStrokeWidth,cornerSmoothing: LocationRecommendation.cornerSmoothing,),child: Container(color: Colors.white.withValues(alpha: 0.1),- width: LocationRecommendation.width ++ width:+ LocationRecommendation.width +LocationRecommendation.outerStrokeWidth * 2,- height: LocationRecommendation.height ++ height:+ LocationRecommendation.height +LocationRecommendation.outerStrokeWidth * 2,),),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 62ecf79bb9..ea3efdd1d0 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@@ -1,5 +1,6 @@import "dart:async";+import "package:ente_components/theme/text_styles.dart";import "package:ente_pure_utils/ente_pure_utils.dart";import "package:flutter/material.dart";import "package:photos/core/constants.dart";@@ -50,10 +51,12 @@ class _PeopleSectionState extends State<PeopleSection> {for (Stream<Event> stream in streamsToListenTo) {streamSubscriptions.add(stream.listen((event) async {- _examples = await widget.sectionType.getData(- context,- limit: kSearchSectionLimit,- ) as List<GenericSearchResult>;+ _examples =+ await widget.sectionType.getData(+ context,+ limit: kSearchSectionLimit,+ )+ as List<GenericSearchResult>;setState(() {});}),);@@ -98,7 +101,9 @@ class _PeopleSectionState extends State<PeopleSection> {padding: const EdgeInsets.all(12),child: Text(widget.sectionType.sectionTitle(context),- style: textTheme.largeBold,+ style: TextStyles.h2.copyWith(+ color: textTheme.largeBold.color,+ ),),),if (shouldShowMore)@@ -133,7 +138,9 @@ class _PeopleSectionState extends State<PeopleSection> {children: [Text(widget.sectionType.sectionTitle(context),- style: textTheme.largeBold,+ style: TextStyles.h2.copyWith(+ color: textTheme.largeBold.color,+ ),),const SizedBox(height: 24),Text(@@ -200,15 +207,17 @@ class PersonSearchExample extends StatelessWidget {@overrideWidget build(BuildContext context) {- final bool isCluster = searchResult.type() == ResultType.faces &&+ final bool isCluster =+ searchResult.type() == ResultType.faces &&searchResult.params.containsKey(kClusterParamId);return ListenableBuilder(listenable: selectedPeople ?? ValueNotifier(false),builder: (context, _) {final id = searchResult.params[kPersonParamID] as String?;- final bool isSelected =- id != null ? selectedPeople?.isPersonSelected(id) ?? false : false;+ final bool isSelected = id != null+ ? selectedPeople?.isPersonSelected(id) ?? false+ : false;return GestureDetector(onTap: selectedPeople != null@@ -296,49 +305,50 @@ class PersonSearchExample extends StatelessWidget {),isCluster? isLocalGalleryMode- ? const SizedBox.shrink()- : GestureDetector(- behavior: HitTestBehavior.translucent,- onTap: () async {- final clusterId =- searchResult.params[kClusterParamId] as String?;- final result = await showAssignPersonAction(- context,- clusterID: clusterId ?? searchResult.name(),- );- if (result != null &&- result is (PersonEntity, EnteFile)) {- // ignore: unawaited_futures- routeToPage(+ ? const SizedBox.shrink()+ : GestureDetector(+ behavior: HitTestBehavior.translucent,+ onTap: () async {+ final clusterId =+ searchResult.params[kClusterParamId]+ as String?;+ final result = await showAssignPersonAction(context,- PeoplePage(- person: result.$1,- searchResult: null,- ),+ clusterID: clusterId ?? searchResult.name(),);- } else if (result != null &&- result is PersonEntity) {- // ignore: unawaited_futures- routeToPage(- context,- PeoplePage(- person: result,- searchResult: null,- ),- );- }- },- child: Padding(- padding: const EdgeInsets.only(top: 6, bottom: 0),- child: Text(- AppLocalizations.of(context).addName,- maxLines: 1,- textAlign: TextAlign.center,- overflow: TextOverflow.ellipsis,- style: getEnteTextTheme(context).small,+ if (result != null &&+ result is (PersonEntity, EnteFile)) {+ // ignore: unawaited_futures+ routeToPage(+ context,+ PeoplePage(+ person: result.$1,+ searchResult: null,+ ),+ );+ } else if (result != null &&+ result is PersonEntity) {+ // ignore: unawaited_futures+ routeToPage(+ context,+ PeoplePage(+ person: result,+ searchResult: null,+ ),+ );+ }+ },+ child: Padding(+ padding: const EdgeInsets.only(top: 6, bottom: 0),+ child: Text(+ AppLocalizations.of(context).addName,+ maxLines: 1,+ textAlign: TextAlign.center,+ overflow: TextOverflow.ellipsis,+ style: getEnteTextTheme(context).small,+ ),),- ),- )+ ): Padding(padding: const EdgeInsets.only(top: 6, bottom: 0),child: SizedBox(diff --git a/mobile/apps/photos/lib/ui/viewer/search_tab/section_header.dart b/mobile/apps/photos/lib/ui/viewer/search_tab/section_header.dartindex d088914bbb..9af6c904ea 100644--- a/mobile/apps/photos/lib/ui/viewer/search_tab/section_header.dart+++ b/mobile/apps/photos/lib/ui/viewer/search_tab/section_header.dart@@ -1,3 +1,4 @@+import "package:ente_components/theme/text_styles.dart";import "package:ente_pure_utils/ente_pure_utils.dart";import "package:flutter/material.dart";import "package:photos/models/search/search_types.dart";@@ -19,6 +20,7 @@ class SectionHeader extends StatelessWidget {@overrideWidget build(BuildContext context) {final colorScheme = getEnteColorScheme(context);+ final textTheme = getEnteTextTheme(context);return GestureDetector(onTap: () {if (hasMore) {@@ -37,7 +39,9 @@ class SectionHeader extends StatelessWidget {padding: const EdgeInsets.all(12),child: Text(sectionType.sectionTitle(context),- style: getEnteTextTheme(context).largeBold,+ style: TextStyles.h2.copyWith(+ color: textTheme.largeBold.color,+ ),),),hasMore