fix security image

This commit is contained in:
Danmei Chen 2019-02-22 10:31:19 +01:00
parent a09af1dc02
commit faba1d00d8

View file

@ -140,9 +140,8 @@
return cell;
cell.linphoneImage.hidden = !linphoneContact;
cell.securityImage.hidden = !(model && linphone_presence_model_has_capability(model, LinphoneFriendCapabilityLimeX3dh));
int capabilities = [[_addressesCached objectAtIndex:indexPath.row] intValue];
cell.securityImage.hidden = capabilities < 2;
BOOL greyCellForEncryptedChat = _isEncrypted ? capabilities > 1 : TRUE;
BOOL greyCellForGroupChat = _isGroupChat ? capabilities > 0 : TRUE;
cell.userInteractionEnabled = cell.greyView.hidden = greyCellForEncryptedChat && greyCellForGroupChat;