mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-05-03 22:56:49 +00:00
Prefill the contact name with the display name or username of selected contact
This commit is contained in:
parent
2b9941eb50
commit
f43f1d496f
1 changed files with 4 additions and 0 deletions
|
|
@ -24,6 +24,7 @@
|
|||
.import Linphone 1.0 as Linphone
|
||||
|
||||
.import 'qrc:/ui/scripts/Utils/utils.js' as Utils
|
||||
.import 'qrc:/ui/scripts/LinphoneUtils/linphone-utils.js' as LinphoneUtils
|
||||
|
||||
// =============================================================================
|
||||
|
||||
|
|
@ -59,6 +60,9 @@ function handleCreation () {
|
|||
|
||||
if (sipAddress && sipAddress.length > 0) {
|
||||
vcard.addSipAddress(sipAddress)
|
||||
vcard.username = LinphoneUtils.getContactUsername(Linphone.SipAddressesModel.getSipAddressObserver(sipAddress, sipAddress))
|
||||
}else{
|
||||
vcard.username = ' '// Username initialization to avoid Belr parsing issue when setting new name
|
||||
}
|
||||
|
||||
contactEdit._vcard = vcard
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue