Fix a crash on sip address selection when clicking on bar

This commit is contained in:
Julien Wadel 2021-09-14 16:22:58 +02:00
parent ae08795274
commit 98bf0b2095
3 changed files with 30 additions and 12 deletions

View file

@ -63,16 +63,22 @@ DialogPlus {
secure:0,
visible:true,
handler: function (entry) {
CallsListModel.launchVideoCall(entry.sipAddress)
exit(1)
handlerSipAddress(entry.sipAddress)
},
visible: SettingsModel.videoSupported && SettingsModel.showStartVideoCallButton
visible: SettingsModel.videoSupported && SettingsModel.showStartVideoCallButton,
handlerSipAddress: function(sipAddress) {
CallsListModel.launchVideoCall(sipAddress)
exit(1)
}
}, {
icon: 'call',
secure:0,
visible:true,
handler: function (entry) {
CallsListModel.launchAudioCall(entry.sipAddress, "")
handlerSipAddress(entry.sipAddress)
},
handlerSipAddress: function(sipAddress) {
CallsListModel.launchAudioCall(sipAddress, "")
exit(1)
}
}]
@ -83,7 +89,7 @@ DialogPlus {
id: sipAddressesModel
}
onEntryClicked: actions[0].handler(entry)
onEntryClicked: actions[0].handlerSipAddress(entry)
}
}
}

View file

@ -79,18 +79,23 @@ DialogPlus {
SipAddressesView {
anchors.fill: parent
actions: [{
icon: 'transfer',
secure: 0,
visible: true,
handler: function (entry) {
handlerSipAddress(entry.sipAddress)
},
handlerSipAddress: function(sipAddress){
if (attended) {
var call = CallsListModel.launchAudioCall(entry.sipAddress, callTransfer.call.peerAddress)
var call = CallsListModel.launchAudioCall(sipAddress, callTransfer.call.peerAddress)
} else {
callTransfer.call.transferTo(entry.sipAddress)
callTransfer.call.transferTo(sipAddress)
}
exit(1)
}
}]
genSipAddress: filter.text
@ -99,7 +104,7 @@ DialogPlus {
id: sipAddressesModel
}
onEntryClicked: actions[0].handler(entry)
onEntryClicked: actions[0].handlerSipAddress(entry)
}
}
}

View file

@ -97,8 +97,12 @@ DialogPlus {
secure:0,
visible: true,
handler: function (entry) {
conferenceHelperModel.toAdd.addToConference(entry.sipAddress)
handlerSipAddress(entry.sipAddress)
},
handerSipAddress: function(sipAddress){
conferenceHelperModel.toAdd.addToConference(sipAddress)
}
}]
genSipAddress: filter.text
@ -107,7 +111,7 @@ DialogPlus {
id: conferenceHelperModel
}
onEntryClicked: actions[0].handler(entry)
onEntryClicked: actions[0].handerSipAddress(entry)
}
}
}
@ -145,13 +149,16 @@ DialogPlus {
visible:true,
secure:0,
handler: function (entry) {
model.removeFromConference(entry.sipAddress)
handlerSipAddress(entry.sipAddress)
},
handlerSipAddress: function(sipAddress){
model.removeFromConference(sipAddress)
}
}]
model: conferenceHelperModel.toAdd
onEntryClicked: actions[0].handler(entry)
onEntryClicked: actions[0].handlerSipAddress(entry)
}
}
}