π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Better toggle for viewing ignored faces
laurenspriema72f76f154c4
diff --git a/mobile/apps/photos/lib/l10n/intl_en.arb b/mobile/apps/photos/lib/l10n/intl_en.arbindex 12124e9db2..45ccb21fd1 100644--- a/mobile/apps/photos/lib/l10n/intl_en.arb+++ b/mobile/apps/photos/lib/l10n/intl_en.arb@@ -1220,6 +1220,7 @@"visibility": "Visibility","hideFromMemories": "Hide from memories","showInMemories": "Show in memories",+ "showIgnored": "Show ignored","create": "Create","viewAll": "View all","nothingSharedWithYouYet": "Nothing shared with you yet",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 b9e123d71f..c1022c3ee7 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@@ -1,5 +1,6 @@import "dart:async";+import 'package:flutter/cupertino.dart';import 'package:flutter/material.dart';import "package:photos/core/event_bus.dart";import "package:photos/events/event.dart";@@ -613,10 +614,6 @@ class _PeopleSectionAllWidgetState extends State<PeopleSectionAllWidget> {searchIconPadding:const EdgeInsets.fromLTRB(12, 12, horizontalEdgePadding, 12),actions: [- Padding(- padding: const EdgeInsets.only(right: 12),- child: _buildIgnoredPeopleToggle(colorScheme),- ),Padding(padding: const EdgeInsets.only(right: horizontalEdgePadding),child: _buildSortMenu(context, textTheme, colorScheme),@@ -867,16 +864,24 @@ class _PeopleSectionAllWidgetState extends State<PeopleSectionAllWidget> {details.globalPosition.dx,details.globalPosition.dy + 50,),- items: List.generate(sortKeys.length, (index) {- final key = sortKeys[index];- return _buildSortMenuItem(- key,- index == sortKeys.length - 1,+ items: [+ ...List.generate(sortKeys.length, (index) {+ final key = sortKeys[index];+ return _buildSortMenuItem(+ key,+ index == sortKeys.length - 1,+ textTheme,+ colorScheme,+ l10n,+ );+ }),+ _buildIgnoredPeopleMenuItem(+ context,textTheme,colorScheme,l10n,- );- }),+ ),+ ],);if (!mounted || selectedKey == null) {return;@@ -905,17 +910,6 @@ class _PeopleSectionAllWidgetState extends State<PeopleSectionAllWidget> {);}- Widget _buildIgnoredPeopleToggle(EnteColorScheme colorScheme) {- return IconButtonWidget(- icon: _showingIgnoredPeople- ? Icons.visibility_rounded- : Icons.visibility_off_rounded,- iconButtonType: IconButtonType.secondary,- iconColor: colorScheme.textMuted,- onTap: _toggleIgnoredPeopleView,- );- }-PopupMenuItem<PeopleSortKey> _buildSortMenuItem(PeopleSortKey key,bool isLast,@@ -1009,6 +1003,49 @@ class _PeopleSectionAllWidgetState extends State<PeopleSectionAllWidget> {);}+ PopupMenuItem<PeopleSortKey> _buildIgnoredPeopleMenuItem(+ BuildContext context,+ EnteTextTheme textTheme,+ EnteColorScheme colorScheme,+ AppLocalizations l10n,+ ) {+ return PopupMenuItem<PeopleSortKey>(+ value: null,+ onTap: _toggleIgnoredPeopleView,+ padding: EdgeInsets.zero,+ height: _sortMenuItemHeight,+ child: Container(+ width: double.infinity,+ height: _sortMenuItemHeight,+ padding: const EdgeInsets.symmetric(horizontal: 16),+ decoration: BoxDecoration(+ border: Border(+ top: BorderSide(+ width: 0.5,+ color: colorScheme.strokeFaint,+ ),+ ),+ ),+ child: Row(+ mainAxisAlignment: MainAxisAlignment.spaceBetween,+ children: [+ Text(+ l10n.showIgnored,+ style: textTheme.miniMuted,+ ),+ IgnorePointer(+ child: CupertinoSwitch(+ value: _showingIgnoredPeople,+ onChanged: (_) {},+ activeTrackColor: colorScheme.primary500,+ ),+ ),+ ],+ ),+ ),+ );+ }+Widget _buildShowMoreOrLessButton(BuildContext context) {return Container(padding: const EdgeInsets.fromLTRB(20, 8, 20, 24),