Skip to content

Commit

Permalink
fix(mail): remove duplicate recipients in draft
Browse files Browse the repository at this point in the history
  • Loading branch information
cgx committed Sep 30, 2020
1 parent 9150bdd commit ec1a01e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions UI/MailerUI/UIxMailEditor.m
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,10 @@ - (NSString *) from
NSRange r;
BOOL valid;

identities = [[[self clientObject] mailAccountFolder] identities];
if ([identities count])
if ([from length])
{
if ([from length])
identities = [[[self clientObject] mailAccountFolder] identities];
if ([identities count])
{
allIdentities = [identities objectEnumerator];
valid = NO;
Expand Down Expand Up @@ -352,7 +352,7 @@ - (void) setTo: (NSArray *) newTo
if ([newTo isKindOfClass: [NSNull class]])
newTo = nil;

ASSIGN (to, newTo);
ASSIGN (to, [newTo uniqueObjects]);
}

- (NSArray *) to
Expand All @@ -365,7 +365,7 @@ - (void) setCc: (NSArray *) newCc
if ([newCc isKindOfClass: [NSNull class]])
newCc = nil;

ASSIGN (cc, newCc);
ASSIGN (cc, [newCc uniqueObjects]);
}

- (NSArray *) cc
Expand All @@ -378,7 +378,7 @@ - (void) setBcc: (NSArray *) newBcc
if ([newBcc isKindOfClass: [NSNull class]])
newBcc = nil;

ASSIGN (bcc, newBcc);
ASSIGN (bcc, [newBcc uniqueObjects]);
}

- (NSArray *) bcc
Expand Down

0 comments on commit ec1a01e

Please sign in to comment.