mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-19 21:53:19 +00:00
applied changes from 59d4ff7e6c2fe24e74adbe4891af30ece4f5e858
through c05e0091913ed81140571dab045abdaf56a77ef8 Monotone-Parent: 850fd7677033b28a7218a010f55b437ebd12f665 Monotone-Revision: eb1f58bb7bd3454ffc857750264fae0b27b86d32 Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2011-11-14T16:07:04
This commit is contained in:
@@ -268,10 +268,9 @@
|
||||
|
||||
- (NSString *) formattedMailtoString: (NGVCard *) card
|
||||
{
|
||||
NSString *email;
|
||||
NSString *firstName, *lastName, *email;
|
||||
NSMutableString *fn, *rc = nil;
|
||||
NSArray *n;
|
||||
unsigned int max;
|
||||
CardElement *n;
|
||||
|
||||
if ([card isKindOfClass: [NGVCard class]])
|
||||
email = [card preferredEMail];
|
||||
@@ -291,17 +290,17 @@
|
||||
&& [card isKindOfClass: [NGVCard class]])
|
||||
{
|
||||
n = [card n];
|
||||
if (n)
|
||||
lastName = [n flattenedValueAtIndex: 0 forKey: @""];
|
||||
firstName = [n flattenedValueAtIndex: 1 forKey: @""];
|
||||
if ([firstName length] > 0)
|
||||
{
|
||||
max = [n count];
|
||||
if (max > 0)
|
||||
{
|
||||
if (max > 1)
|
||||
fn = [NSMutableString stringWithFormat: @"%@ %@", [n objectAtIndex: 1], [n objectAtIndex: 0]];
|
||||
else
|
||||
fn = [NSMutableString stringWithString: [n objectAtIndex: 0]];
|
||||
}
|
||||
if ([lastName length] > 0)
|
||||
fn = [NSMutableString stringWithFormat: @"%@ %@", firstName, lastName];
|
||||
else
|
||||
fn = [NSMutableString stringWithString: firstName];
|
||||
}
|
||||
else if ([lastName length] > 0)
|
||||
fn = [NSMutableString stringWithString: lastName];
|
||||
}
|
||||
if ([fn length] > 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user