Improve handling of mail delegates

This commit is contained in:
Francis Lachapelle committed 2016-07-06 15:43:38 -04:00
1 parent 0e8637ec9f
commit bfd3508949
3 files changed
+14 -85

No files matched your search

+2 -2
View File
@@ -1100,7 +1100,7 @@ static NSString *inboxFolderName = @"INBOX";
max = [newDelegates count];
for (count = 0; count < max; count++)
{
currentDelegate = [newDelegates objectAtIndex: 0];
currentDelegate = [newDelegates objectAtIndex: count];
delegateUser = [SOGoUser userWithLogin: currentDelegate];
if (delegateUser)
{
@@ -1127,7 +1127,7 @@ static NSString *inboxFolderName = @"INBOX";
max = [oldDelegates count];
for (count = 0; count < max; count++)
{
currentDelegate = [oldDelegates objectAtIndex: 0];
currentDelegate = [oldDelegates objectAtIndex: count];
delegateUser = [SOGoUser userWithLogin: currentDelegate];
if (delegateUser)
{
+12 -8
View File
@@ -346,18 +346,22 @@ static Class NSNullK;
NSDictionary *contactInfos;
NSString *cn, *email, *fullEmail;
fullEmail = nil;
contactInfos = [self contactInfosForUserWithUIDorEmail: uid];
email = [contactInfos objectForKey: @"c_email"];
cn = [contactInfos objectForKey: @"cn"];
if ([cn length] > 0)
if (contactInfos)
{
if ([email length] > 0)
fullEmail = [NSString stringWithFormat: @"%@ <%@>", cn, email];
email = [contactInfos objectForKey: @"c_email"];
cn = [contactInfos objectForKey: @"cn"];
if ([cn length] > 0)
{
if ([email length] > 0)
fullEmail = [NSString stringWithFormat: @"%@ <%@>", cn, email];
else
fullEmail = cn;
}
else
fullEmail = cn;
fullEmail = email;
}
else
fullEmail = email;
return fullEmail;
}