mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-24 07:08:07 +00:00
fix(app):
- use `asStringUriOnly` instead of `asString` to parse calls in `SipAddressesModel` - `Contact` component uses only a `SipAddress` object now
This commit is contained in:
parent
e361a6a602
commit
65e53dee1e
4 changed files with 7 additions and 15 deletions
|
|
@ -265,7 +265,7 @@ void SipAddressesModel::initSipAddresses () {
|
|||
// Get sip addresses from calls.
|
||||
QSet<QString> address_done;
|
||||
for (const auto &call_log : core->getCallLogs()) {
|
||||
QString sip_address = ::Utils::linphoneStringToQString(call_log->getRemoteAddress()->asString());
|
||||
QString sip_address = ::Utils::linphoneStringToQString(call_log->getRemoteAddress()->asStringUriOnly());
|
||||
|
||||
if (address_done.contains(sip_address))
|
||||
continue; // Already used.
|
||||
|
|
|
|||
|
|
@ -18,19 +18,11 @@ Rectangle {
|
|||
property alias sipAddressColor: description.sipAddressColor
|
||||
property alias usernameColor: description.usernameColor
|
||||
|
||||
// Can be a SipAddress object of SipAddressesModel or just a string.
|
||||
property var sipAddress
|
||||
|
||||
property var _contact: Utils.isObject(sipAddress)
|
||||
? sipAddress.contact
|
||||
: SipAddressesModel.mapSipAddressToContact(sipAddress)
|
||||
property var entry
|
||||
property var _contact: entry.contact
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
function _getSipAddress () {
|
||||
return item.sipAddress.sipAddress || item.sipAddress
|
||||
}
|
||||
|
||||
color: 'transparent' // No color by default.
|
||||
height: ContactStyle.height
|
||||
|
||||
|
|
@ -49,7 +41,7 @@ Rectangle {
|
|||
Layout.preferredWidth: ContactStyle.contentHeight
|
||||
image: _contact && _contact.vcard.avatar
|
||||
presenceLevel: _contact ? _contact.presenceLevel : -1
|
||||
username: LinphoneUtils.getContactUsername(_contact || _getSipAddress())
|
||||
username: LinphoneUtils.getContactUsername(_contact || entry.sipAddress)
|
||||
}
|
||||
|
||||
ContactDescription {
|
||||
|
|
@ -57,7 +49,7 @@ Rectangle {
|
|||
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
sipAddress: _getSipAddress()
|
||||
sipAddress: entry.sipAddress
|
||||
username: avatar.username
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ SearchBox {
|
|||
Contact {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
sipAddress: $entry.sipAddress
|
||||
entry: $entry
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ ColumnLayout {
|
|||
? TimelineStyle.contact.backgroundColor.a
|
||||
: TimelineStyle.contact.backgroundColor.b
|
||||
)
|
||||
sipAddress: $timelineEntry
|
||||
entry: $timelineEntry
|
||||
sipAddressColor: view.currentIndex === index
|
||||
? TimelineStyle.contact.sipAddress.color.selected
|
||||
: TimelineStyle.contact.sipAddress.color.normal
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue