Skip to content

armgit / ente

Public Imported from GitHub
0

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

feat(share-to-multi-contacts-at-once): change state to selected state of an existing email if an already existing email in the list is added from 'add new email'

ashilkn487be4a45138
diff --git a/mobile/lib/ui/sharing/add_partipant_page.dart b/mobile/lib/ui/sharing/add_partipant_page.dart
index 993005ac70..9c0500dbe5 100644
--- a/mobile/lib/ui/sharing/add_partipant_page.dart
+++ b/mobile/lib/ui/sharing/add_partipant_page.dart
@@ -329,6 +329,12 @@ class _AddParticipantPage extends State<AddParticipantPage> {
);
if (result && mounted) {
setState(() {
+ for (var suggestedUser in _suggestedUsers) {
+ if (suggestedUser.email == _email) {
+ _selectedEmails.add(suggestedUser.email);
+ return;
+ }
+ }
_suggestedUsers.insert(0, User(email: _email));
_selectedEmails.add(_email);
});