Add tags input to edit mail recipients

This commit is contained in:
Francis Lachapelle
2015-06-11 15:42:32 -04:00
parent e01e0adac8
commit 09d469927f
6 changed files with 59 additions and 32 deletions
+15 -16
View File
@@ -84,7 +84,7 @@
NSString *sourceFolder;
NSString *text;
NSMutableArray *fromEMails;
NSDictionary *from;
NSString *from;
SOGoMailFolder *sentFolder;
BOOL isHTML;
@@ -114,7 +114,7 @@ static NSArray *infoKeys = nil;
@"from", @"inReplyTo",
@"replyTo",
@"priority", @"receipt",
@"content", nil];
@"text", nil];
}
- (id) init
@@ -253,21 +253,20 @@ static NSArray *infoKeys = nil;
ASSIGN (from, newFrom);
}
- (NSDictionary *) _emailFromIdentity: (NSDictionary *) identity
- (NSString *) _emailFromIdentity: (NSDictionary *) identity
{
static NSArray *keys = nil;
NSString *fullName, *format;
if (!keys)
{
keys = [NSArray arrayWithObjects: @"email", @"fullName", nil];
[keys retain];
}
fullName = [identity objectForKey: @"fullName"];
if ([fullName length])
format = @"%{fullName} <%{email}>";
else
format = @"%{email}";
return [NSDictionary dictionaryWithObjects: [identity objectsForKeys: keys notFoundMarker: [NSNull null]]
forKeys: [NSArray arrayWithObjects: @"email", @"name", nil]];
return [identity keysWithFormat: format];
}
- (NSDictionary *) from
- (NSString *) from
{
NSDictionary *identity;
@@ -420,7 +419,7 @@ static NSArray *infoKeys = nil;
{
NSArray *identities;
int count, max;
NSDictionary *email;
NSString *email;
SOGoMailAccount *account;
if (!fromEMails)
@@ -461,7 +460,7 @@ static NSArray *infoKeys = nil;
[self setTo: [filteredParams objectForKey: @"to"]];
[self setCc: [filteredParams objectForKey: @"cc"]];
[self setBcc: [filteredParams objectForKey: @"bcc"]];
[self setText: [filteredParams objectForKey: @"content"]];
[self setText: [filteredParams objectForKey: @"text"]];
return filteredParams;
}
@@ -721,9 +720,9 @@ static NSArray *infoKeys = nil;
[self setSourceFolder: [co sourceFolder]];
data = [NSMutableDictionary dictionaryWithObjectsAndKeys:
[NSArray arrayWithObject: [self from]], @"from",
[self from], @"from",
[self localeCode], @"locale",
text, @"content",
text, @"text",
nil];
if ((value = [self replyTo]))
[data setObject: value forKey: @"replyTo"];