π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Fix: Handle already linked email err
Neeraj Gupta917ce21b3504
diff --git a/mobile/lib/generated/intl/messages_sr.dart b/mobile/lib/generated/intl/messages_sr.dartnew file mode 100644index 0000000000..baacea2a95--- /dev/null+++ b/mobile/lib/generated/intl/messages_sr.dart@@ -0,0 +1,25 @@+// DO NOT EDIT. This is code generated via package:intl/generate_localized.dart+// This is a library that provides messages for a sr locale. All the+// messages from the main program should be duplicated here with the same+// function name.++// Ignore issues from commonly used lints in this file.+// ignore_for_file:unnecessary_brace_in_string_interps, unnecessary_new+// ignore_for_file:prefer_single_quotes,comment_references, directives_ordering+// ignore_for_file:annotate_overrides,prefer_generic_function_type_aliases+// ignore_for_file:unused_import, file_names, avoid_escaping_inner_quotes+// ignore_for_file:unnecessary_string_interpolations, unnecessary_string_escapes++import 'package:intl/intl.dart';+import 'package:intl/message_lookup_by_library.dart';++final messages = new MessageLookup();++typedef String MessageIfAbsent(String messageStr, List<dynamic> args);++class MessageLookup extends MessageLookupByLibrary {+ String get localeName => 'sr';++ final messages = _notInlinedMessages(_notInlinedMessages);+ static Map<String, Function> _notInlinedMessages(_) => <String, Function>{};+}diff --git a/mobile/lib/ui/viewer/people/link_email_screen.dart b/mobile/lib/ui/viewer/people/link_email_screen.dartindex 37aa85882a..f4effaa7e6 100644--- a/mobile/lib/ui/viewer/people/link_email_screen.dart+++ b/mobile/lib/ui/viewer/people/link_email_screen.dart@@ -318,7 +318,8 @@ class _LinkEmailScreen extends State<LinkEmailScreen> {BuildContext context,) async {if (await checkIfEmailAlreadyAssignedToAPerson(email)) {- throw Exception("Email already linked to a person");+ await showAlreadyLinkedEmailDialog(context, email);+ return false;}String? publicKey;diff --git a/mobile/lib/ui/viewer/people/person_selection_action_widgets.dart b/mobile/lib/ui/viewer/people/person_selection_action_widgets.dartindex 26899e037b..e22a7696cb 100644--- a/mobile/lib/ui/viewer/people/person_selection_action_widgets.dart+++ b/mobile/lib/ui/viewer/people/person_selection_action_widgets.dart@@ -143,7 +143,8 @@ class _LinkContactToPersonSelectionPageStaterequired PersonEntity personEntity,}) async {if (await checkIfEmailAlreadyAssignedToAPerson(emailToLink)) {- throw Exception("Email already linked to a person");+ await showAlreadyLinkedEmailDialog(context, emailToLink);+ return null;}final personName = personEntity.data.name;