Skip to content

armgit / ente

Public Imported from GitHub
0

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

Use shared selection status icon

ashilkn55eaa71be410
diff --git a/mobile/apps/photos/lib/ui/settings/backup/backup_folder_selection_page.dart b/mobile/apps/photos/lib/ui/settings/backup/backup_folder_selection_page.dart
index a54e5c880f..9b0bf37b6b 100644
--- a/mobile/apps/photos/lib/ui/settings/backup/backup_folder_selection_page.dart
+++ b/mobile/apps/photos/lib/ui/settings/backup/backup_folder_selection_page.dart
@@ -14,6 +14,7 @@ import 'package:photos/service_locator.dart';
import 'package:photos/services/sync/remote_sync_service.dart';
import 'package:photos/ui/common/loading_widget.dart';
import 'package:photos/ui/settings/backup/backup_settings_screen.dart';
+import 'package:photos/ui/viewer/actions/select_all_status_icon.dart';
import 'package:photos/ui/viewer/file/thumbnail_widget.dart';
import 'package:photos/utils/dialog_util.dart';
@@ -387,10 +388,11 @@ class _BackupFolderSelectionPageState extends State<BackupFolderSelectionPage> {
color: colors.backgroundBase,
shape: BoxShape.circle,
),
- child: Icon(
- Icons.check_circle_rounded,
- color: colors.green,
- size: 22,
+ child: SelectAllStatusIcon(
+ isSelected: true,
+ size: 18,
+ selectedFillColor: colors.green,
+ selectedTickColor: colors.backgroundBase,
),
),
),
diff --git a/mobile/apps/photos/lib/ui/tools/deduplicate_page.dart b/mobile/apps/photos/lib/ui/tools/deduplicate_page.dart
index b0475caf0d..5ec438fc4a 100644
--- a/mobile/apps/photos/lib/ui/tools/deduplicate_page.dart
+++ b/mobile/apps/photos/lib/ui/tools/deduplicate_page.dart
@@ -13,6 +13,7 @@ import 'package:photos/services/collections_service.dart';
import "package:photos/theme/ente_theme.dart";
import 'package:photos/ui/components/buttons/button_widget.dart';
import "package:photos/ui/components/models/button_type.dart";
+import "package:photos/ui/viewer/actions/select_all_status_icon.dart";
import 'package:photos/ui/viewer/file/detail_page.dart';
import 'package:photos/ui/viewer/file/thumbnail_widget.dart';
import 'package:photos/ui/viewer/gallery/empty_state.dart';
@@ -237,8 +238,10 @@ class _DeduplicatePageState extends State<DeduplicatePage> {
await deleteDuplicates(totalSize);
} catch (e) {
log("Failed to delete duplicates", error: e);
- showGenericErrorDialog(context: context, error: e)
- .ignore();
+ showGenericErrorDialog(
+ context: context,
+ error: e,
+ ).ignore();
}
},
),
@@ -289,7 +292,9 @@ class _DeduplicatePageState extends State<DeduplicatePage> {
if (!mounted) {
return;
}
- log("AddingNow ${collectionToFilesToAddMap[collectionID]!.length} files to $collectionID");
+ log(
+ "AddingNow ${collectionToFilesToAddMap[collectionID]!.length} files to $collectionID",
+ );
await CollectionsService.instance.addSilentlyToCollection(
collectionID,
collectionToFilesToAddMap[collectionID]!,
@@ -304,8 +309,9 @@ class _DeduplicatePageState extends State<DeduplicatePage> {
if (filesToDelele.isNotEmpty) {
await deleteFilesFromRemoteOnly(context, filesToDelele);
Bus.instance.fire(UserDetailsChangedEvent());
- Navigator.of(context)
- .pop(DeduplicationResult(filesToDelele.length, totalSize));
+ Navigator.of(
+ context,
+ ).pop(DeduplicationResult(filesToDelele.length, totalSize));
}
}
@@ -339,16 +345,11 @@ class _DeduplicatePageState extends State<DeduplicatePage> {
),
style: Theme.of(context).textTheme.titleSmall,
),
- !selectedGrids.contains(itemIndex)
- ? Icon(
- Icons.check_circle_outlined,
- color: getEnteColorScheme(context).strokeMuted,
- size: 24,
- )
- : const Icon(
- Icons.check_circle,
- size: 24,
- ),
+ SelectAllStatusIcon(
+ isSelected: selectedGrids.contains(itemIndex),
+ size: 18,
+ unselectedColor: getEnteColorScheme(context).strokeMuted,
+ ),
],
),
),
@@ -413,7 +414,8 @@ class _DeduplicatePageState extends State<DeduplicatePage> {
children: [
SizedBox(
//the numerator will give the width of the screen excuding the whitespaces in the the grid row
- height: (MediaQuery.of(context).size.width -
+ height:
+ (MediaQuery.of(context).size.width -
(crossAxisSpacing * crossAxisCount)) /
crossAxisCount,
child: Hero(
@@ -438,8 +440,9 @@ class _DeduplicatePageState extends State<DeduplicatePage> {
CollectionsService.instance
.getCollectionByID(file.collectionID!)!
.displayName,
- style:
- Theme.of(context).textTheme.bodySmall!.copyWith(fontSize: 12),
+ style: Theme.of(
+ context,
+ ).textTheme.bodySmall!.copyWith(fontSize: 12),
overflow: TextOverflow.ellipsis,
),
),
diff --git a/mobile/apps/photos/lib/ui/tools/similar_images_page.dart b/mobile/apps/photos/lib/ui/tools/similar_images_page.dart
index a6e63b3d7f..9da5b0181a 100644
--- a/mobile/apps/photos/lib/ui/tools/similar_images_page.dart
+++ b/mobile/apps/photos/lib/ui/tools/similar_images_page.dart
@@ -23,6 +23,7 @@ import "package:photos/theme/text_style.dart";
import 'package:photos/ui/components/buttons/button_widget.dart';
import "package:photos/ui/components/models/button_type.dart";
import "package:photos/ui/components/toggle_switch_widget.dart";
+import "package:photos/ui/viewer/actions/select_all_status_icon.dart";
import "package:photos/ui/viewer/file/detail_page.dart";
import "package:photos/ui/viewer/file/thumbnail_widget.dart";
import "package:photos/utils/delete_file_util.dart";
@@ -179,9 +180,10 @@ class _SimilarImagesPageState extends State<SimilarImagesPage>
alignment: Alignment.center,
child: Container(
height: 42,
- padding:
- const EdgeInsets.symmetric(horizontal: 16, vertical: 12)
- .copyWith(left: 14),
+ padding: const EdgeInsets.symmetric(
+ horizontal: 16,
+ vertical: 12,
+ ).copyWith(left: 14),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
color: Colors.black.withValues(alpha: 0.72),
@@ -519,9 +521,11 @@ class _SimilarImagesPageState extends State<SimilarImagesPage>
}
final selectedFiles = _selectedFiles.files;
- final selectedFilteredFiles =
- selectedFiles.intersection(eligibleFilteredFiles);
- final allFilteredSelected = eligibleFilteredFiles.isNotEmpty &&
+ final selectedFilteredFiles = selectedFiles.intersection(
+ eligibleFilteredFiles,
+ );
+ final allFilteredSelected =
+ eligibleFilteredFiles.isNotEmpty &&
selectedFilteredFiles.length >= autoSelectCount;
final hasSelectedFiles = selectedFilteredFiles.isNotEmpty;
@@ -545,22 +549,23 @@ class _SimilarImagesPageState extends State<SimilarImagesPage>
duration: const Duration(milliseconds: 300),
transitionBuilder:
(Widget child, Animation<double> animation) {
- return SlideTransition(
- position: Tween<Offset>(
- begin: const Offset(0, 0.1),
- end: Offset.zero,
- ).animate(
- CurvedAnimation(
- parent: animation,
- curve: Curves.easeOutCubic,
- ),
- ),
- child: FadeTransition(
- opacity: animation,
- child: child,
- ),
- );
- },
+ return SlideTransition(
+ position:
+ Tween<Offset>(
+ begin: const Offset(0, 0.1),
+ end: Offset.zero,
+ ).animate(
+ CurvedAnimation(
+ parent: animation,
+ curve: Curves.easeOutCubic,
+ ),
+ ),
+ child: FadeTransition(
+ opacity: animation,
+ child: child,
+ ),
+ );
+ },
child: hasSelectedFiles
? Column(
key: const ValueKey('delete_section'),
@@ -570,10 +575,11 @@ class _SimilarImagesPageState extends State<SimilarImagesPage>
child: ButtonWidget(
labelText: AppLocalizations.of(context)
.deletePhotosWithSize(
- count: NumberFormat()
- .format(selectedFilteredFiles.length),
- size: formatBytes(totalSize),
- ),
+ count: NumberFormat().format(
+ selectedFilteredFiles.length,
+ ),
+ size: formatBytes(totalSize),
+ ),
buttonType: ButtonType.critical,
shouldSurfaceExecutionStates: false,
shouldShowSuccessConfirmation: false,
@@ -744,8 +750,9 @@ class _SimilarImagesPageState extends State<SimilarImagesPage>
if (bMostRecentCreationTime == null) {
return -1;
}
- final recentComparison =
- bMostRecentCreationTime.compareTo(aMostRecentCreationTime);
+ final recentComparison = bMostRecentCreationTime.compareTo(
+ aMostRecentCreationTime,
+ );
if (recentComparison != 0) {
return recentComparison;
}
@@ -753,8 +760,9 @@ class _SimilarImagesPageState extends State<SimilarImagesPage>
});
break;
case SortKey.count:
- _similarFilesList
- .sort((a, b) => b.files.length.compareTo(a.files.length));
+ _similarFilesList.sort(
+ (a, b) => b.files.length.compareTo(a.files.length),
+ );
break;
}
if (!updateState || _isDisposed) return;
@@ -772,8 +780,9 @@ class _SimilarImagesPageState extends State<SimilarImagesPage>
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
- AppLocalizations.of(context)
- .similarImagesCount(count: similarFiles.files.length) +
+ AppLocalizations.of(
+ context,
+ ).similarImagesCount(count: similarFiles.files.length) +
(kDebugMode
? " (I: d: ${similarFiles.furthestDistance.toStringAsFixed(3)})"
: ""),
@@ -806,7 +815,8 @@ class _SimilarImagesPageState extends State<SimilarImagesPage>
const SizedBox(height: 16),
LayoutBuilder(
builder: (context, constraints) {
- final itemWidth = (constraints.maxWidth -
+ final itemWidth =
+ (constraints.maxWidth -
(crossAxisSpacing * (crossAxisCount - 1))) /
crossAxisCount;
final itemHeight =
@@ -892,8 +902,9 @@ class _SimilarImagesPageState extends State<SimilarImagesPage>
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
- color: Colors.black
- .withAlpha((0.4 * 255).toInt()),
+ color: Colors.black.withAlpha(
+ (0.4 * 255).toInt(),
+ ),
),
),
],
@@ -908,10 +919,11 @@ class _SimilarImagesPageState extends State<SimilarImagesPage>
switchInCurve: Curves.easeOut,
switchOutCurve: Curves.easeIn,
child: isSelected
- ? const Icon(
- Icons.check_circle_rounded,
- color: Colors.white,
- size: 22,
+ ? const SelectAllStatusIcon(
+ isSelected: true,
+ size: 18,
+ selectedFillColor: Colors.white,
+ selectedTickColor: Colors.black,
)
: null,
),
@@ -1050,14 +1062,15 @@ class _SimilarImagesPageState extends State<SimilarImagesPage>
if (groupAtIndexSurvives(topIndex)) {
anchorGroup = beforeFiltered[topIndex!];
} else {
- final visiblePositions = _itemPositionsListener.itemPositions.value
- .where(
- (p) => p.index >= 0 && p.index < beforeFiltered.length,
- )
- .toList()
- ..sort(
- (a, b) => a.itemLeadingEdge.compareTo(b.itemLeadingEdge),
- );
+ final visiblePositions =
+ _itemPositionsListener.itemPositions.value
+ .where(
+ (p) => p.index >= 0 && p.index < beforeFiltered.length,
+ )
+ .toList()
+ ..sort(
+ (a, b) => a.itemLeadingEdge.compareTo(b.itemLeadingEdge),
+ );
int? lastVisibleIndex;
for (final position in visiblePositions) {
final idx = position.index;
@@ -1108,8 +1121,9 @@ class _SimilarImagesPageState extends State<SimilarImagesPage>
}
if (!similarGroup.isEmpty && createSymlink) {
final filesToKeep = similarGroup.files;
- final collectionIDs =
- filesToKeep.map((file) => file.collectionID).toSet();
+ final collectionIDs = filesToKeep
+ .map((file) => file.collectionID)
+ .toSet();
for (final deletedFile in groupDeleteFiles) {
final collectionID = deletedFile.collectionID;
if (collectionIDs.contains(collectionID) || collectionID == null) {
@@ -1136,8 +1150,9 @@ class _SimilarImagesPageState extends State<SimilarImagesPage>
return;
}
// Check permission before attempting to add symlinks
- final collection =
- CollectionsService.instance.getCollectionByID(collectionID);
+ final collection = CollectionsService.instance.getCollectionByID(
+ collectionID,
+ );
if (collection != null && collection.canAutoAdd(userID!)) {
await CollectionsService.instance.addSilentlyToCollection(
collectionID,
@@ -1166,8 +1181,9 @@ class _SimilarImagesPageState extends State<SimilarImagesPage>
_itemScrollController.isAttached) {
WidgetsBinding.instance.addPostFrameCallback((_) {
final afterFiltered = _filteredGroups;
- final newIndex =
- afterFiltered.indexWhere((g) => identical(g, anchorGroup));
+ final newIndex = afterFiltered.indexWhere(
+ (g) => identical(g, anchorGroup),
+ );
if (newIndex != -1 && _itemScrollController.isAttached) {
_itemScrollController.jumpTo(index: newIndex, alignment: 0.0);
}
diff --git a/mobile/apps/photos/lib/ui/viewer/actions/select_all_status_icon.dart b/mobile/apps/photos/lib/ui/viewer/actions/select_all_status_icon.dart
index 8a4ed4e163..e794f9b5c3 100644
--- a/mobile/apps/photos/lib/ui/viewer/actions/select_all_status_icon.dart
+++ b/mobile/apps/photos/lib/ui/viewer/actions/select_all_status_icon.dart
@@ -7,10 +7,16 @@ class SelectAllStatusIcon extends StatelessWidget {
final bool isSelected;
final double size;
+ final Color? selectedFillColor;
+ final Color? selectedTickColor;
+ final Color? unselectedColor;
const SelectAllStatusIcon({
required this.isSelected,
this.size = 18,
+ this.selectedFillColor,
+ this.selectedTickColor,
+ this.unselectedColor,
super.key,
});
@@ -18,6 +24,9 @@ class SelectAllStatusIcon extends StatelessWidget {
Widget build(BuildContext context) {
final colors = components.ComponentTheme.colorsOf(context);
final tickSize = size * _tickScale;
+ final selectedFill = selectedFillColor ?? colors.fillBase;
+ final selectedTick = selectedTickColor ?? colors.textReverse;
+ final unselected = unselectedColor ?? colors.textLight;
if (isSelected) {
return Container(
@@ -25,12 +34,12 @@ class SelectAllStatusIcon extends StatelessWidget {
height: size,
alignment: Alignment.center,
decoration: BoxDecoration(
- color: colors.fillBase,
+ color: selectedFill,
shape: BoxShape.circle,
),
child: HugeIcon(
icon: HugeIcons.strokeRoundedTick02,
- color: colors.textReverse,
+ color: selectedTick,
size: tickSize,
),
);
@@ -42,11 +51,11 @@ class SelectAllStatusIcon extends StatelessWidget {
alignment: Alignment.center,
decoration: BoxDecoration(
shape: BoxShape.circle,
- border: Border.all(color: colors.textLight),
+ border: Border.all(color: unselected),
),
child: HugeIcon(
icon: HugeIcons.strokeRoundedTick02,
- color: colors.textLight,
+ color: unselected,
size: tickSize,
),
);
diff --git a/mobile/apps/photos/lib/ui/viewer/gallery/component/gallery_file_widget.dart b/mobile/apps/photos/lib/ui/viewer/gallery/component/gallery_file_widget.dart
index e04b9767bf..d7ccf35827 100644
--- a/mobile/apps/photos/lib/ui/viewer/gallery/component/gallery_file_widget.dart
+++ b/mobile/apps/photos/lib/ui/viewer/gallery/component/gallery_file_widget.dart
@@ -14,6 +14,7 @@ import "package:photos/models/selected_files.dart";
import "package:photos/services/app_lifecycle_service.dart";
import "package:photos/theme/ente_theme.dart";
import "package:photos/ui/common/touch_cross_detector.dart";
+import "package:photos/ui/viewer/actions/select_all_status_icon.dart";
import "package:photos/ui/viewer/file/detail_page.dart";
import "package:photos/ui/viewer/file/thumbnail_widget.dart";
import "package:photos/ui/viewer/gallery/component/swipe_selectable_file_widget.dart";
@@ -56,8 +57,9 @@ class _GalleryFileWidgetState extends State<GalleryFileWidget> {
_isFileSelected =
widget.selectedFiles?.isFileSelected(widget.file) ?? false;
widget.selectedFiles?.addListener(_selectedFilesListener);
- _fileUploadedSubscription =
- Bus.instance.on<FileUploadedEvent>().listen((event) {
+ _fileUploadedSubscription = Bus.instance.on<FileUploadedEvent>().listen((
+ event,
+ ) {
if (event.file.generatedID != null &&
event.file.generatedID == widget.file.generatedID &&
mounted) {
@@ -138,14 +140,14 @@ class _GalleryFileWidgetState extends State<GalleryFileWidget> {
borderRadius: borderRadius,
child: Hero(
tag: heroTag,
- flightShuttleBuilder: (
- flightContext,
- animation,
- flightDirection,
- fromHeroContext,
- toHeroContext,
- ) =>
- thumbnailWidget,
+ flightShuttleBuilder:
+ (
+ flightContext,
+ animation,
+ flightDirection,
+ fromHeroContext,
+ toHeroContext,
+ ) => thumbnailWidget,
transitionOnUserGestures: true,
child: thumbnailWidget,
),
@@ -159,10 +161,11 @@ class _GalleryFileWidgetState extends State<GalleryFileWidget> {
Positioned(
right: 4,
top: 4,
- child: Icon(
- Icons.check_circle_rounded,
- size: 20,
- color: selectionColor, //same for both themes
+ child: SelectAllStatusIcon(
+ isSelected: true,
+ size: 16,
+ selectedFillColor: selectionColor, //same for both themes
+ selectedTickColor: Colors.black,
),
),
],
@@ -172,14 +175,14 @@ class _GalleryFileWidgetState extends State<GalleryFileWidget> {
borderRadius: borderRadius,
child: Hero(
tag: heroTag,
- flightShuttleBuilder: (
- flightContext,
- animation,
- flightDirection,
- fromHeroContext,
- toHeroContext,
- ) =>
- thumbnailWidget,
+ flightShuttleBuilder:
+ (
+ flightContext,
+ animation,
+ flightDirection,
+ fromHeroContext,
+ toHeroContext,
+ ) => thumbnailWidget,
transitionOnUserGestures: true,
child: thumbnailWidget,
),
@@ -217,7 +220,7 @@ class _GalleryFileWidgetState extends State<GalleryFileWidget> {
void _onTapNoSelectionLimit(BuildContext context, EnteFile file) async {
final bool shouldToggleSelection =
(widget.selectedFiles?.files.isNotEmpty ?? false) ||
- (GalleryContextState.of(context)?.inSelectionMode ?? false);
+ (GalleryContextState.of(context)?.inSelectionMode ?? false);
if (shouldToggleSelection) {
if (widget.selectedFiles == null) {
return;
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.dart
index 8a7e40829c..5d675c04fa 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
@@ -26,6 +26,7 @@ import "package:photos/ui/components/banners/save_faces_banner.dart";
import "package:photos/ui/components/bottom_action_bar/people_bottom_action_bar_widget.dart";
import "package:photos/ui/components/buttons/icon_button_widget.dart";
import "package:photos/ui/components/searchable_appbar.dart";
+import "package:photos/ui/viewer/actions/select_all_status_icon.dart";
import "package:photos/ui/viewer/file/no_thumbnail_widget.dart";
import "package:photos/ui/viewer/file/thumbnail_widget.dart";
import "package:photos/ui/viewer/people/face_thumbnail_squircle.dart";
@@ -142,8 +143,9 @@ class SelectablePersonSearchExample extends StatelessWidget {
final personId = searchResult.params[kPersonParamID] as String?;
final clusterId = searchResult.params[kClusterParamId] as String?;
- final idToUse =
- (personId != null && personId.isNotEmpty) ? personId : clusterId;
+ final idToUse = (personId != null && personId.isNotEmpty)
+ ? personId
+ : clusterId;
if (idToUse != null && idToUse.isNotEmpty) {
selectedPeople.toggleSelection(idToUse);
@@ -161,7 +163,8 @@ class SelectablePersonSearchExample extends StatelessWidget {
@override
Widget build(BuildContext context) {
- final bool isCluster = searchResult.type() == ResultType.faces &&
+ final bool isCluster =
+ searchResult.type() == ResultType.faces &&
searchResult.params.containsKey(kClusterParamId);
final bool isPinnedPerson =
!isCluster && (searchResult.params[kPersonPinned] as bool? ?? false);
@@ -171,8 +174,9 @@ class SelectablePersonSearchExample extends StatelessWidget {
builder: (context, _) {
final personId = searchResult.params[kPersonParamID] as String?;
final clusterId = searchResult.params[kClusterParamId] as String?;
- final idToCheck =
- (personId != null && personId.isNotEmpty) ? personId : clusterId;
+ final idToCheck = (personId != null && personId.isNotEmpty)
+ ? personId
+ : clusterId;
final bool isSelected = idToCheck != null
? selectedPeople.isPersonSelected(idToCheck)
: false;
@@ -244,10 +248,11 @@ class SelectablePersonSearchExample extends StatelessWidget {
switchInCurve: Curves.easeOut,
switchOutCurve: Curves.easeIn,
child: isSelected
- ? const Icon(
- Icons.check_circle_rounded,
- color: Colors.white,
- size: 22,
+ ? const SelectAllStatusIcon(
+ isSelected: true,
+ size: 18,
+ selectedFillColor: Colors.white,
+ selectedTickColor: Colors.black,
)
: null,
),
@@ -484,8 +489,9 @@ class _PeopleSectionAllWidgetState extends State<PeopleSectionAllWidget> {
_prioritizeNamedIgnoredPeople(normalFaces);
}
final showAllFaces = _showingAllFaces || _showingIgnoredPeople;
- final results =
- showAllFaces ? [...normalFaces, ...extraFaces] : normalFaces;
+ final results = showAllFaces
+ ? [...normalFaces, ...extraFaces]
+ : normalFaces;
if (widget.namedOnly) {
results.removeWhere((element) => element.params[kPersonParamID] == null);
@@ -493,11 +499,13 @@ class _PeopleSectionAllWidgetState extends State<PeopleSectionAllWidget> {
if (init) {
// sort widget.selectedPeople first
results.sort((a, b) {
- final aIndex = widget.selectedPeople?.personIds.contains(
+ final aIndex =
+ widget.selectedPeople?.personIds.contains(
a.params[kPersonParamID],
) ??
false;
- final bIndex = widget.selectedPeople?.personIds.contains(
+ final bIndex =
+ widget.selectedPeople?.personIds.contains(
b.params[kPersonParamID],
) ??
false;
@@ -661,7 +669,7 @@ class _PeopleSectionAllWidgetState extends State<PeopleSectionAllWidget> {
final hasResults = _isSearching
? filteredNormalFaces.isNotEmpty || filteredExtraFaces.isNotEmpty
: filteredNormalFaces.isNotEmpty ||
- (!widget.namedOnly && filteredExtraFaces.isNotEmpty);
+ (!widget.namedOnly && filteredExtraFaces.isNotEmpty);
if (_isLoaded && !hasResults) {
slivers.add(
SliverFillRemaining(
@@ -677,7 +685,8 @@ class _PeopleSectionAllWidgetState extends State<PeopleSectionAllWidget> {
final screenWidth = MediaQuery.of(context).size.width;
final crossAxisCount = (screenWidth / 100).floor();
- final itemSize = (screenWidth -
+ final itemSize =
+ (screenWidth -
((horizontalEdgePadding * 2) +
((crossAxisCount - 1) * gridPadding))) /
crossAxisCount;
@@ -948,8 +957,9 @@ class _PeopleSectionAllWidgetState extends State<PeopleSectionAllWidget> {
detail = _isSortAscending(key) ? l10n.sortAToZ : l10n.sortZToA;
break;
case PeopleSortKey.lastUpdated:
- detail =
- _isSortAscending(key) ? l10n.sortOldestFirst : l10n.sortNewestFirst;
+ detail = _isSortAscending(key)
+ ? l10n.sortOldestFirst
+ : l10n.sortNewestFirst;
break;
}
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.dart
index ea3efdd1d0..0a40b88b3a 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
@@ -17,6 +17,7 @@ import "package:photos/models/selected_people.dart";
import "package:photos/service_locator.dart" show isLocalGalleryMode;
import "package:photos/theme/ente_theme.dart";
import "package:photos/ui/settings/ml/machine_learning_settings_page.dart";
+import "package:photos/ui/viewer/actions/select_all_status_icon.dart";
import "package:photos/ui/viewer/file/no_thumbnail_widget.dart";
import "package:photos/ui/viewer/file/thumbnail_widget.dart";
import "package:photos/ui/viewer/people/add_person_action_sheet.dart";
@@ -293,10 +294,11 @@ class PersonSearchExample extends StatelessWidget {
switchInCurve: Curves.easeOut,
switchOutCurve: Curves.easeIn,
child: isSelected
- ? const Icon(
- Icons.check_circle_rounded,
- color: Colors.white,
- size: 22,
+ ? const SelectAllStatusIcon(
+ isSelected: true,
+ size: 18,
+ selectedFillColor: Colors.white,
+ selectedTickColor: Colors.black,
)
: null,
),