mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-18 11:58:09 +00:00
Fixed contact SIP URI display if not from default domain
This commit is contained in:
parent
826fa4a1ad
commit
1895535877
1 changed files with 2 additions and 1 deletions
|
|
@ -170,7 +170,8 @@ class ContactViewModel(private val c: Contact) : ErrorReportingViewModel(), Cont
|
|||
val hasPresence = presenceModel?.basicStatus == PresenceBasicStatus.Open
|
||||
val isMe = coreContext.core.defaultProxyConfig?.identityAddress?.weakEqual(address) ?: false
|
||||
val secureChatAllowed = !isMe && contact.friend?.getPresenceModelForUriOrTel(value)?.hasCapability(FriendCapability.LimeX3Dh) ?: false
|
||||
val noa = ContactNumberOrAddressViewModel(address, hasPresence, LinphoneUtils.getDisplayName(address), showSecureChat = secureChatAllowed, listener = listener)
|
||||
val displayValue = if (coreContext.core.defaultProxyConfig?.domain == address.domain) (address.username ?: value) else value
|
||||
val noa = ContactNumberOrAddressViewModel(address, hasPresence, displayValue, showSecureChat = secureChatAllowed, listener = listener)
|
||||
list.add(noa)
|
||||
}
|
||||
for (number in contact.phoneNumbers) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue