mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-02-07 15:08:24 +00:00
fix(src/components/sip-addresses/SipAddressesModel): use correct call timestamp
This commit is contained in:
parent
4dbfd7c689
commit
4b97a94da2
1 changed files with 5 additions and 1 deletions
|
|
@ -338,7 +338,11 @@ void SipAddressesModel::initSipAddresses () {
|
|||
|
||||
QVariantMap map;
|
||||
map["sipAddress"] = sip_address;
|
||||
map["timestamp"] = QDateTime::fromMSecsSinceEpoch((call_log->getStartDate() + call_log->getDuration()) * 1000);
|
||||
|
||||
// The duration can be wrong if status is not success.
|
||||
map["timestamp"] = call_log->getStatus() == linphone::CallStatus::CallStatusSuccess
|
||||
? QDateTime::fromMSecsSinceEpoch((call_log->getStartDate() + call_log->getDuration()) * 1000)
|
||||
: QDateTime::fromMSecsSinceEpoch(call_log->getStartDate() * 1000);
|
||||
|
||||
auto it = m_sip_addresses.find(sip_address);
|
||||
if (it == m_sip_addresses.end() || map["timestamp"] > (*it)["timestamp"])
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue