mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-11 23:07:12 +00:00
Improve handling of mail delegates
This commit is contained in:
1 parent
0e8637ec9f
commit
bfd3508949
3 files changed
+14
-85
No files matched your search
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user