fix(ui/views/App/MainWindow/ContactEdit): set first sip address field on contact creation

This commit is contained in:
Ronan Abhamon 2016-12-28 15:14:40 +01:00
parent a67cc3b8d3
commit dce2d1eb00

View file

@ -86,6 +86,15 @@ ColumnLayout {
if (!_contact) {
_vcard = CoreManager.createDetachedVcardModel()
if (sipAddress && sipAddress.length > 0) {
_vcard.addSipAddress(
Utils.startsWith(sipAddress, 'sip:')
? sipAddress
: 'sip:' + sipAddress
)
}
_edition = true
} else {
_vcard = _contact.vcard