mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-05-03 13:56:25 +00:00
Fix Qml errors on contacts.
This commit is contained in:
parent
4b4243901e
commit
4a7118d57c
3 changed files with 8 additions and 7 deletions
|
|
@ -29,9 +29,10 @@ function setData (data) {
|
|||
var model = values.model
|
||||
|
||||
model.clear()
|
||||
data.forEach(function (data) {
|
||||
model.append({ $value: data, $isInvalid: false })
|
||||
})
|
||||
if(data)
|
||||
data.forEach(function (data) {
|
||||
model.append({ $value: data, $isInvalid: false })
|
||||
})
|
||||
}
|
||||
|
||||
function setInvalid (index, status) {
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ function handleUrlChanged () {
|
|||
// -----------------------------------------------------------------------------
|
||||
|
||||
function buildAddressFields () {
|
||||
|
||||
if(!contactEdit._vcard) return []
|
||||
var address = contactEdit._vcard.address
|
||||
|
||||
return [{
|
||||
|
|
|
|||
|
|
@ -112,8 +112,8 @@ ColumnLayout {
|
|||
id: avatar
|
||||
|
||||
anchors.fill: parent
|
||||
image: _vcard.avatar
|
||||
username: _vcard.username
|
||||
image: _vcard ? _vcard.avatar : ''
|
||||
username: _vcard ? _vcard.username : ''
|
||||
presenceLevel: _contact ? _contact.presenceLevel : -1
|
||||
visible: (isLoaded() && !parent.hovered) || !_edition
|
||||
}
|
||||
|
|
@ -408,7 +408,7 @@ ColumnLayout {
|
|||
}
|
||||
|
||||
TextButtonB {
|
||||
enabled: usernameInput.text.length > 0 && _vcard.sipAddresses.length > 0
|
||||
enabled: usernameInput.text.length > 0 && _vcard && _vcard.sipAddresses.length > 0
|
||||
text: qsTr('save')
|
||||
onClicked: Logic.save()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue