mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-05 08:34:30 +00:00
Monotone-Parent: b2bfdd5b59fed2950707131eca171b4758bcd635
Monotone-Revision: 57b39725f8c002b9b6cb9b05ad3fa2e2401cd46b Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-02-13T14:50:00 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -664,34 +664,18 @@
|
||||
return self;
|
||||
}
|
||||
|
||||
- (NSArray *) photosURL
|
||||
- (BOOL) hasPhoto
|
||||
{
|
||||
return [[self clientObject] hasPhoto];
|
||||
}
|
||||
|
||||
- (NSString *) photoURL
|
||||
{
|
||||
NSArray *photoElements;
|
||||
NSURL *soURL;
|
||||
NSString *baseInlineURL, *photoURL;
|
||||
NGVCardPhoto *photo;
|
||||
int count, max;
|
||||
|
||||
if (!photosURL)
|
||||
{
|
||||
soURL = [[self clientObject] soURL];
|
||||
baseInlineURL = [soURL absoluteString];
|
||||
photoElements = [card childrenWithTag: @"photo"];
|
||||
max = [photoElements count];
|
||||
photosURL = [[NSMutableArray alloc] initWithCapacity: max];
|
||||
for (count = 0; count < max; count++)
|
||||
{
|
||||
photo = [photoElements objectAtIndex: count];
|
||||
if ([photo isInline])
|
||||
photoURL = [NSString stringWithFormat: @"%@/photo%d",
|
||||
baseInlineURL, count];
|
||||
else
|
||||
photoURL = [photo flattenedValuesForKey: @""];
|
||||
[photosURL addObject: photoURL];
|
||||
}
|
||||
}
|
||||
soURL = [[self clientObject] soURL];
|
||||
|
||||
return photosURL;
|
||||
return [NSString stringWithFormat: @"%@/photo", [soURL absoluteString]];
|
||||
}
|
||||
|
||||
@end /* UIxContactView */
|
||||
|
||||
Reference in New Issue
Block a user