mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
set image for securityButton
This commit is contained in:
parent
74174dd4b1
commit
e62ca22d23
5 changed files with 8 additions and 2 deletions
|
|
@ -229,6 +229,7 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
[_tableController setChatRoom:_chatRoom];
|
||||
|
||||
_chatView.hidden = NO;
|
||||
[_encryptedButton setImage:[FastAddressBook imageForSecurityLevel:linphone_chat_room_get_security_level(_chatRoom)] forState:UIControlStateNormal];
|
||||
[self update];
|
||||
[self shareFile];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
DevicesMenuEntry *entry = [_devicesMenuEntries objectAtIndex:indexPath.row];
|
||||
|
||||
[ContactDisplay setDisplayNameLabel:cell.addressLabel forAddress:linphone_participant_get_address(entry->participant)];
|
||||
cell.devices = linphone_participant_get_devices(entry->participant);
|
||||
cell.participant = entry->participant;
|
||||
[cell update:(entry->numberOfDevices != 0)];
|
||||
|
||||
return cell;
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
@property (weak, nonatomic) IBOutlet UIButton *securityButton;
|
||||
@property (weak, nonatomic) IBOutlet UITableView *devicesTable;
|
||||
@property bctbx_list_t *devices;
|
||||
@property LinphoneParticipant *participant;
|
||||
|
||||
- (IBAction)onSecurityCallClick:(id)sender;
|
||||
- (id)initWithIdentifier:(NSString *)identifier;
|
||||
|
|
|
|||
|
|
@ -27,13 +27,17 @@
|
|||
}
|
||||
|
||||
- (void)update:(BOOL)listOpen {
|
||||
_devices = linphone_participant_get_devices(_participant);
|
||||
UIImage *image = [FastAddressBook imageForSecurityLevel:linphone_participant_get_security_level(_participant)];
|
||||
if (bctbx_list_size(_devices) == 1) {
|
||||
[_securityButton setImage:image forState:UIControlStateNormal];
|
||||
_securityButton.hidden = FALSE;
|
||||
_dropMenuButton.hidden = TRUE;
|
||||
} else {
|
||||
UIImage *image = listOpen ? [UIImage imageNamed:@"chevron_list_open"] : [UIImage imageNamed:@"chevron_list_close"];
|
||||
[_dropMenuButton setImage:image forState:UIControlStateNormal];
|
||||
}
|
||||
[_securityImage setImage:image];
|
||||
}
|
||||
|
||||
- (IBAction)onSecurityCallClick:(id)sender {
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@
|
|||
return [UIImage imageNamed:@"security_2_indicator.png.png"];
|
||||
|
||||
default:
|
||||
return nil;
|
||||
return [UIImage imageNamed:@"security_toogle_icon_grey.png"];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue