зеркало из https://github.com/nextcloud/talk-ios.git
Add image for email contacts.
Signed-off-by: Ivan Sein <ivan@nextcloud.com>
This commit is contained in:
Родитель
86de11c688
Коммит
0cab4dfc0f
|
@ -342,9 +342,11 @@
|
|||
|
||||
cell.labelTitle.text = participant.name;
|
||||
|
||||
if ([participant.source isEqualToString:@"users"]) {
|
||||
if ([participant.source isEqualToString:kParticipantTypeUser]) {
|
||||
[cell.contactImage setImageWithURLRequest:[[NCAPIController sharedInstance] createAvatarRequestForUser:participant.userId andSize:96 usingAccount:[[NCDatabaseManager sharedInstance] activeAccount]]
|
||||
placeholderImage:nil success:nil failure:nil];
|
||||
} else if ([participant.source isEqualToString:kParticipantTypeEmail]) {
|
||||
[cell.contactImage setImage:[UIImage imageNamed:@"mail-bg"]];
|
||||
} else {
|
||||
[cell.contactImage setImage:[UIImage imageNamed:@"group-bg"]];
|
||||
}
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "mail-bg.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "mail-bg@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "mail-bg@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 735 B |
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 1.3 KiB |
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 1.7 KiB |
|
@ -103,8 +103,14 @@
|
|||
|
||||
cell.labelTitle.text = contact.name;
|
||||
|
||||
[cell.contactImage setImageWithURLRequest:[[NCAPIController sharedInstance] createAvatarRequestForUser:contact.userId andSize:96 usingAccount:[[NCDatabaseManager sharedInstance] activeAccount]]
|
||||
placeholderImage:nil success:nil failure:nil];
|
||||
if ([contact.source isEqualToString:kParticipantTypeUser]) {
|
||||
[cell.contactImage setImageWithURLRequest:[[NCAPIController sharedInstance] createAvatarRequestForUser:contact.userId andSize:96 usingAccount:[[NCDatabaseManager sharedInstance] activeAccount]]
|
||||
placeholderImage:nil success:nil failure:nil];
|
||||
} else if ([contact.source isEqualToString:kParticipantTypeEmail]) {
|
||||
[cell.contactImage setImage:[UIImage imageNamed:@"mail-bg"]];
|
||||
} else {
|
||||
[cell.contactImage setImage:[UIImage imageNamed:@"group-bg"]];
|
||||
}
|
||||
|
||||
cell.accessoryView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"checkbox-unchecked"]];
|
||||
for (NCUser *user in _selectedParticipants) {
|
||||
|
|
|
@ -366,9 +366,11 @@ NSString * const NCRoomCreatedNotification = @"NCRoomCreatedNotification";
|
|||
|
||||
cell.labelTitle.text = participant.name;
|
||||
|
||||
if ([participant.source isEqualToString:@"users"]) {
|
||||
if ([participant.source isEqualToString:kParticipantTypeUser]) {
|
||||
[cell.contactImage setImageWithURLRequest:[[NCAPIController sharedInstance] createAvatarRequestForUser:participant.userId andSize:96 usingAccount:[[NCDatabaseManager sharedInstance] activeAccount]]
|
||||
placeholderImage:nil success:nil failure:nil];
|
||||
} else if ([participant.source isEqualToString:kParticipantTypeEmail]) {
|
||||
[cell.contactImage setImage:[UIImage imageNamed:@"mail-bg"]];
|
||||
} else {
|
||||
[cell.contactImage setImage:[UIImage imageNamed:@"group-bg"]];
|
||||
}
|
||||
|
|
|
@ -319,9 +319,11 @@
|
|||
|
||||
cell.labelTitle.text = participant.name;
|
||||
|
||||
if ([participant.source isEqualToString:@"users"]) {
|
||||
if ([participant.source isEqualToString:kParticipantTypeUser]) {
|
||||
[cell.contactImage setImageWithURLRequest:[[NCAPIController sharedInstance] createAvatarRequestForUser:participant.userId andSize:96 usingAccount:[[NCDatabaseManager sharedInstance] activeAccount]]
|
||||
placeholderImage:nil success:nil failure:nil];
|
||||
} else if ([participant.source isEqualToString:kParticipantTypeEmail]) {
|
||||
[cell.contactImage setImage:[UIImage imageNamed:@"mail-bg"]];
|
||||
} else {
|
||||
[cell.contactImage setImage:[UIImage imageNamed:@"group-bg"]];
|
||||
}
|
||||
|
|
|
@ -103,8 +103,14 @@
|
|||
|
||||
cell.labelTitle.text = contact.name;
|
||||
|
||||
[cell.contactImage setImageWithURLRequest:[[NCAPIController sharedInstance] createAvatarRequestForUser:contact.userId andSize:96 usingAccount:[[NCDatabaseManager sharedInstance] activeAccount]]
|
||||
placeholderImage:nil success:nil failure:nil];
|
||||
if ([contact.source isEqualToString:kParticipantTypeUser]) {
|
||||
[cell.contactImage setImageWithURLRequest:[[NCAPIController sharedInstance] createAvatarRequestForUser:contact.userId andSize:96 usingAccount:[[NCDatabaseManager sharedInstance] activeAccount]]
|
||||
placeholderImage:nil success:nil failure:nil];
|
||||
} else if ([contact.source isEqualToString:kParticipantTypeEmail]) {
|
||||
[cell.contactImage setImage:[UIImage imageNamed:@"mail-bg"]];
|
||||
} else {
|
||||
[cell.contactImage setImage:[UIImage imageNamed:@"group-bg"]];
|
||||
}
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче