Skip to content

armgit / ente

Public Imported from GitHub
0

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

[mob][photos] Stop showing name of face filter so that it occupies less space in UI

ashilknb2c6374010d5
diff --git a/mobile/lib/ui/viewer/hierarchicial_search/applied_filters.dart b/mobile/lib/ui/viewer/hierarchicial_search/applied_filters.dart
index fdb956c213..4d272543d6 100644
--- a/mobile/lib/ui/viewer/hierarchicial_search/applied_filters.dart
+++ b/mobile/lib/ui/viewer/hierarchicial_search/applied_filters.dart
@@ -66,7 +66,6 @@ class _AppliedFiltersState extends State<AppliedFilters> {
personId: filter.personId,
clusterId: filter.clusterId,
faceThumbnailFile: filter.faceFile,
- name: filter.name(),
apply: () {
_searchFilterDataProvider.applyFilters([filter]);
},
diff --git a/mobile/lib/ui/viewer/hierarchicial_search/chip_widgets/face_filter_chip.dart b/mobile/lib/ui/viewer/hierarchicial_search/chip_widgets/face_filter_chip.dart
index 7b9db62e4d..20fda3f9c5 100644
--- a/mobile/lib/ui/viewer/hierarchicial_search/chip_widgets/face_filter_chip.dart
+++ b/mobile/lib/ui/viewer/hierarchicial_search/chip_widgets/face_filter_chip.dart
@@ -8,7 +8,6 @@ class FaceFilterChip extends StatefulWidget {
final String? personId;
final String? clusterId;
final EnteFile faceThumbnailFile;
- final String name;
final VoidCallback apply;
final VoidCallback remove;
final bool isApplied;
@@ -18,7 +17,6 @@ class FaceFilterChip extends StatefulWidget {
required this.personId,
required this.clusterId,
required this.faceThumbnailFile,
- required this.name,
required this.apply,
required this.remove,
required this.isApplied,
@@ -65,55 +63,37 @@ class _FaceFilterChipState extends State<FaceFilterChip> {
width: widget.isInAllFiltersView ? 1 : 0.5,
),
),
- child: Padding(
- padding: EdgeInsets.only(
- right: !widget.isInAllFiltersView && widget.name.isNotEmpty
- ? 8.0
- : 0,
- ),
- child: Row(
- mainAxisSize: MainAxisSize.min,
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- ClipOval(
- child: SizedBox(
- width: kFilterChipHeight * scale,
- height: kFilterChipHeight * scale,
- child: PersonFaceWidget(
- widget.faceThumbnailFile,
- personId: widget.personId,
- clusterID: widget.clusterId,
- thumbnailFallback: false,
- useFullFile: false,
- ),
+ child: Row(
+ mainAxisSize: MainAxisSize.min,
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ ClipOval(
+ child: SizedBox(
+ width: kFilterChipHeight * scale,
+ height: kFilterChipHeight * scale,
+ child: PersonFaceWidget(
+ widget.faceThumbnailFile,
+ personId: widget.personId,
+ clusterID: widget.clusterId,
+ thumbnailFallback: false,
+ useFullFile: false,
),
),
- !widget.isInAllFiltersView && widget.name.isNotEmpty
- ? Padding(
- padding: const EdgeInsets.symmetric(horizontal: 4),
- child: Text(
- widget.name,
- style: getEnteTextTheme(context).miniBold,
- ),
- )
- : const SizedBox.shrink(),
- widget.isApplied && !widget.isInAllFiltersView
- ? SizedBox(width: widget.name.isNotEmpty ? 2 : 4)
- : const SizedBox.shrink(),
- widget.isApplied && !widget.isInAllFiltersView
- ? Icon(
- Icons.close_rounded,
- size: 16,
- color: getEnteColorScheme(context).textMuted,
- )
- : const SizedBox.shrink(),
- widget.isApplied &&
- widget.name.isEmpty &&
- !widget.isInAllFiltersView
- ? const SizedBox(width: 8)
- : const SizedBox.shrink(),
- ],
- ),
+ ),
+ widget.isApplied && !widget.isInAllFiltersView
+ ? const SizedBox(width: 4)
+ : const SizedBox.shrink(),
+ widget.isApplied && !widget.isInAllFiltersView
+ ? Icon(
+ Icons.close_rounded,
+ size: 16,
+ color: getEnteColorScheme(context).textMuted,
+ )
+ : const SizedBox.shrink(),
+ widget.isApplied && !widget.isInAllFiltersView
+ ? const SizedBox(width: 8)
+ : const SizedBox.shrink(),
+ ],
),
),
),
diff --git a/mobile/lib/ui/viewer/hierarchicial_search/filter_options_bottom_sheet.dart b/mobile/lib/ui/viewer/hierarchicial_search/filter_options_bottom_sheet.dart
index e3bb2bbe36..ff0a5f2cd6 100644
--- a/mobile/lib/ui/viewer/hierarchicial_search/filter_options_bottom_sheet.dart
+++ b/mobile/lib/ui/viewer/hierarchicial_search/filter_options_bottom_sheet.dart
@@ -57,7 +57,6 @@ class _FilterOptionsBottomSheetState extends State<FilterOptionsBottomSheet> {
personId: filter.personId,
clusterId: filter.clusterId,
faceThumbnailFile: filter.faceFile,
- name: filter.name(),
isInAllFiltersView: true,
apply: () {
widget.searchFilterDataProvider
diff --git a/mobile/lib/ui/viewer/hierarchicial_search/recommended_filters.dart b/mobile/lib/ui/viewer/hierarchicial_search/recommended_filters.dart
index 977bc815f4..bd846dba03 100644
--- a/mobile/lib/ui/viewer/hierarchicial_search/recommended_filters.dart
+++ b/mobile/lib/ui/viewer/hierarchicial_search/recommended_filters.dart
@@ -120,7 +120,6 @@ class _RecommendedFiltersState extends State<RecommendedFilters> {
personId: filter.personId,
clusterId: filter.clusterId,
faceThumbnailFile: filter.faceFile,
- name: filter.name(),
apply: () {
_searchFilterDataProvider.applyFilters([filter]);
},