π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Fix potential race condition
laurenspriem967923de2c16
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 c6659d1db7..b6d916dc36 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@@ -607,12 +607,13 @@ class _AppBarWidgetState extends State<PeopleAppBar> {Future<void> _showPerson(BuildContext context) async {final isUnnamedIgnoredPerson = _isLegacyIgnoredName(person.data.name);var shouldCloseDetailPage = false;- await showChoiceDialog(+ final result = await showChoiceDialog(context,title: AppLocalizations.of(context,).areYouSureYouWantToShowThisPersonInPeopleSectionAgain,firstButtonLabel: AppLocalizations.of(context).yesShowPerson,+ isDismissible: false,firstButtonOnTap: () async {try {if (isUnnamedIgnoredPerson) {@@ -644,13 +645,14 @@ class _AppBarWidgetState extends State<PeopleAppBar> {),);}- Navigator.of(context).pop();} catch (e, s) {_logger.severe('Unignoring/showing person failed', e, s);}},);- if (!mounted || !shouldCloseDetailPage) {+ if (!mounted ||+ result?.action != ButtonAction.first ||+ !shouldCloseDetailPage) {return;}await Navigator.of(context).maybePop();