mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 03:18:06 +00:00
Fixed self avatar not displayed in call views
This commit is contained in:
parent
e8c67fdd6f
commit
be47deeb40
1 changed files with 8 additions and 1 deletions
|
|
@ -1193,7 +1193,8 @@ class CurrentCallViewModel
|
||||||
val model = if (conferenceInfo != null) {
|
val model = if (conferenceInfo != null) {
|
||||||
coreContext.contactsManager.getContactAvatarModelForConferenceInfo(conferenceInfo)
|
coreContext.contactsManager.getContactAvatarModelForConferenceInfo(conferenceInfo)
|
||||||
} else {
|
} else {
|
||||||
// Do not use contact avatar model from ContactsManager
|
// Do not use contact avatar model from ContactsManager to be able to show
|
||||||
|
// ZRTP verification status with the device that will answer the call
|
||||||
val friend = coreContext.contactsManager.findContactByAddress(address)
|
val friend = coreContext.contactsManager.findContactByAddress(address)
|
||||||
if (friend != null) {
|
if (friend != null) {
|
||||||
ContactAvatarModel(friend, address)
|
ContactAvatarModel(friend, address)
|
||||||
|
|
@ -1201,6 +1202,12 @@ class CurrentCallViewModel
|
||||||
val fakeFriend = coreContext.core.createFriend()
|
val fakeFriend = coreContext.core.createFriend()
|
||||||
fakeFriend.name = LinphoneUtils.getDisplayName(address)
|
fakeFriend.name = LinphoneUtils.getDisplayName(address)
|
||||||
fakeFriend.address = address
|
fakeFriend.address = address
|
||||||
|
val localAccount = coreContext.core.accountList.find {
|
||||||
|
it.params.identityAddress?.weakEqual(address) == true
|
||||||
|
}
|
||||||
|
if (localAccount != null) {
|
||||||
|
fakeFriend.photo = localAccount.params.pictureUri
|
||||||
|
}
|
||||||
ContactAvatarModel(fakeFriend, address)
|
ContactAvatarModel(fakeFriend, address)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue