π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
icon consistency
laurenspriemd0f2011d9f84
diff --git a/mobile/apps/photos/lib/ui/viewer/actions/people_selection_action_widget.dart b/mobile/apps/photos/lib/ui/viewer/actions/people_selection_action_widget.dartindex 3442c1590d..1ee57d7c94 100644--- a/mobile/apps/photos/lib/ui/viewer/actions/people_selection_action_widget.dart+++ b/mobile/apps/photos/lib/ui/viewer/actions/people_selection_action_widget.dart@@ -111,56 +111,61 @@ class _PeopleSelectionActionWidgetState.toList();final onlyIgnoredPersonsSelected =ignoredSelectedPersonIds.isNotEmpty &&- selectedClusterIds.isEmpty &&- ignoredSelectedPersonIds.length == selectedPersonIds.length;- final bool namedPersonsSelected = selectedPersonIds.isNotEmpty &&+ selectedClusterIds.isEmpty &&+ ignoredSelectedPersonIds.length == selectedPersonIds.length;+ final bool namedPersonsSelected =+ selectedPersonIds.isNotEmpty &&selectedPersonIds.every((id) => (personMap[id]?.data.name ?? "").isNotEmpty,);final bool showEditAction = onlyOnePerson;final bool showReviewAction = onlyOnePerson;- final bool showMergeAction =- onlyIgnoredPersonsSelected ? false : selectedClusterIds.isNotEmpty;- final bool showResetAction =- onlyIgnoredPersonsSelected ? false : onlyOnePerson;+ final bool showMergeAction = onlyIgnoredPersonsSelected+ ? false+ : selectedClusterIds.isNotEmpty;+ final bool showResetAction = onlyIgnoredPersonsSelected+ ? false+ : onlyOnePerson;final bool showShowPersonAction = onlyIgnoredPersonsSelected;- final bool showAutoAddAction =- onlyIgnoredPersonsSelected ? false : onlyPersonSelected;+ final bool showAutoAddAction = onlyIgnoredPersonsSelected+ ? false+ : onlyPersonSelected;final bool showPinAction = onlyIgnoredPersonsSelected? false: onlyPersonSelected &&- namedPersonsSelected &&- selectedPersonIds.every(- (id) => !(personMap[id]?.data.isPinned ?? false),- );+ namedPersonsSelected &&+ selectedPersonIds.every(+ (id) => !(personMap[id]?.data.isPinned ?? false),+ );final bool showUnpinAction = onlyIgnoredPersonsSelected? false: onlyPersonSelected &&- namedPersonsSelected &&- selectedPersonIds.every(- (id) => personMap[id]?.data.isPinned ?? false,- );+ namedPersonsSelected &&+ selectedPersonIds.every(+ (id) => personMap[id]?.data.isPinned ?? false,+ );final bool showHideFromMemoriesAction = onlyIgnoredPersonsSelected? false: onlyPersonSelected &&- namedPersonsSelected &&- selectedPersonIds.every(- (id) => !(personMap[id]?.data.hideFromMemories ?? false),- );+ namedPersonsSelected &&+ selectedPersonIds.every(+ (id) => !(personMap[id]?.data.hideFromMemories ?? false),+ );final bool showShowInMemoriesAction = onlyIgnoredPersonsSelected? false: onlyPersonSelected &&- namedPersonsSelected &&- selectedPersonIds.every(- (id) => personMap[id]?.data.hideFromMemories ?? false,- );+ namedPersonsSelected &&+ selectedPersonIds.every(+ (id) => personMap[id]?.data.hideFromMemories ?? false,+ );final bool hasNonIgnoredSelectedPerson = selectedPersonIds.any((id) => !(personMap[id]?.data.isIgnored ?? true),);final bool showIgnoreAction = onlyIgnoredPersonsSelected? false: selectedClusterIds.isNotEmpty || hasNonIgnoredSelectedPerson;- final bool hasVisibleAction = showEditAction ||+ final bool hasVisibleAction =+ showEditAction ||showReviewAction ||showIgnoreAction ||showMergeAction ||@@ -195,7 +200,7 @@ class _PeopleSelectionActionWidgetStateitems.add(SelectionActionButton(labelText: AppLocalizations.of(context).ignore,- icon: Icons.hide_image_outlined,+ icon: Icons.person_off_outlined,onTap: _onIgnore,shouldShow: showIgnoreAction,),@@ -541,10 +546,12 @@ class _PeopleSelectionActionWidgetStateawait showChoiceDialog(context,title: multiple- ? AppLocalizations.of(context)- .areYouSureYouWantToShowThesePeopleInPeopleSectionAgain- : AppLocalizations.of(context)- .areYouSureYouWantToShowThisPersonInPeopleSectionAgain,+ ? AppLocalizations.of(+ context,+ ).areYouSureYouWantToShowThesePeopleInPeopleSectionAgain+ : AppLocalizations.of(+ context,+ ).areYouSureYouWantToShowThisPersonInPeopleSectionAgain,firstButtonLabel: multiple? AppLocalizations.of(context).yesShowPeople: AppLocalizations.of(context).yesShowPerson,@@ -578,8 +585,10 @@ class _PeopleSelectionActionWidgetStateif (selectedClusterIds.isEmpty) return;if (!mounted) return;- final namedSelectedPersonIds =- _getNamedSelectedPersonIds(selectedPersonIds, personMap);+ final namedSelectedPersonIds = _getNamedSelectedPersonIds(+ selectedPersonIds,+ personMap,+ );String? targetPersonId;PersonEntity? targetPerson;diff --git a/mobile/apps/photos/lib/ui/viewer/people/cluster_app_bar.dart b/mobile/apps/photos/lib/ui/viewer/people/cluster_app_bar.dartindex 4c7546e714..86e29d6eb2 100644--- a/mobile/apps/photos/lib/ui/viewer/people/cluster_app_bar.dart+++ b/mobile/apps/photos/lib/ui/viewer/people/cluster_app_bar.dart@@ -72,10 +72,11 @@ class _AppBarWidgetState extends State<ClusterAppBar> {};collectionActions = CollectionActions(CollectionsService.instance);widget.selectedFiles.addListener(_selectedFilesListener);- _userAuthEventSubscription =- Bus.instance.on<SubscriptionPurchasedEvent>().listen((event) {- setState(() {});- });+ _userAuthEventSubscription = Bus.instance+ .on<SubscriptionPurchasedEvent>()+ .listen((event) {+ setState(() {});+ });_appBarTitle = widget.title;galleryType = widget.type;}@@ -121,7 +122,7 @@ class _AppBarWidgetState extends State<ClusterAppBar> {EntePopupMenuItem(AppLocalizations.of(context).ignorePerson,value: ClusterPopupAction.ignore,- icon: Icons.hide_image_outlined,+ icon: Icons.person_off_outlined,),EntePopupMenuItem(AppLocalizations.of(context).mixedGrouping,diff --git a/mobile/apps/photos/lib/ui/viewer/people/people_app_bar.dart b/mobile/apps/photos/lib/ui/viewer/people/people_app_bar.dartindex b6d916dc36..a532c47667 100644--- a/mobile/apps/photos/lib/ui/viewer/people/people_app_bar.dart+++ b/mobile/apps/photos/lib/ui/viewer/people/people_app_bar.dart@@ -104,10 +104,11 @@ class _AppBarWidgetState extends State<PeopleAppBar> {};widget.selectedFiles.addListener(_selectedFilesListener);- _userAuthEventSubscription =- Bus.instance.on<SubscriptionPurchasedEvent>().listen((event) {- setState(() {});- });+ _userAuthEventSubscription = Bus.instance+ .on<SubscriptionPurchasedEvent>()+ .listen((event) {+ setState(() {});+ });WidgetsBinding.instance.addPostFrameCallback((_) {setState(() {@@ -116,24 +117,25 @@ class _AppBarWidgetState extends State<PeopleAppBar> {title: widget.title,);- _peopleChangedEventSubscription =- Bus.instance.on<PeopleChangedEvent>().listen(- (event) {- if (event.person != null &&- event.type == PeopleEventType.saveOrEditPerson &&- widget.person.remoteID == event.person!.remoteID &&- (event.source == "linkEmailToPerson" ||- event.source == "reassignMe")) {- person = event.person!;+ _peopleChangedEventSubscription = Bus.instance+ .on<PeopleChangedEvent>()+ .listen(+ (event) {+ if (event.person != null &&+ event.type == PeopleEventType.saveOrEditPerson &&+ widget.person.remoteID == event.person!.remoteID &&+ (event.source == "linkEmailToPerson" ||+ event.source == "reassignMe")) {+ person = event.person!;- _appBarTitle = _resolveAppBarTitle(- sourcePerson: person,- title: person.data.name,- );- setState(() {});- }- },- );+ _appBarTitle = _resolveAppBarTitle(+ sourcePerson: person,+ title: person.data.name,+ );+ setState(() {});+ }+ },+ );});});}@@ -163,14 +165,16 @@ class _AppBarWidgetState extends State<PeopleAppBar> {@overrideWidget build(BuildContext context) {- final inheritedSearchFilterData =- InheritedSearchFilterData.maybeOf(context);+ final inheritedSearchFilterData = InheritedSearchFilterData.maybeOf(+ context,+ );final isHierarchicalSearchable =inheritedSearchFilterData?.isHierarchicalSearchable ?? false;return isHierarchicalSearchable? ValueListenableBuilder(valueListenable: inheritedSearchFilterData!- .searchFilterDataProvider!.isSearchingNotifier,+ .searchFilterDataProvider!+ .isSearchingNotifier,child: const PreferredSize(preferredSize: Size.fromHeight(0),child: Flexible(child: RecommendedFiltersForAppbar()),@@ -187,10 +191,9 @@ class _AppBarWidgetState extends State<PeopleAppBar> {): Text(_appBarTitle ?? "",- style: Theme.of(context)- .textTheme- .headlineSmall!- .copyWith(fontSize: 16),+ style: Theme.of(+ context,+ ).textTheme.headlineSmall!.copyWith(fontSize: 16),maxLines: 2,overflow: TextOverflow.ellipsis,),@@ -205,10 +208,9 @@ class _AppBarWidgetState extends State<PeopleAppBar> {centerTitle: false,title: Text(_appBarTitle ?? "",- style: Theme.of(context)- .textTheme- .headlineSmall!- .copyWith(fontSize: 16),+ style: Theme.of(+ context,+ ).textTheme.headlineSmall!.copyWith(fontSize: 16),maxLines: 2,overflow: TextOverflow.ellipsis,),@@ -373,7 +375,7 @@ class _AppBarWidgetState extends State<PeopleAppBar> {value: PeoplePopupAction.ignore,child: Row(children: [- const Icon(Icons.hide_image_outlined),+ const Icon(Icons.person_off_outlined),const Padding(padding: EdgeInsets.all(8),),