mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-30 18:39:23 +00:00
fix(src/components/chat/ChatModel): handle aborted call events
This commit is contained in:
parent
9d8b263218
commit
69f114e5b6
2 changed files with 23 additions and 16 deletions
|
|
@ -518,6 +518,18 @@ void ChatModel::removeEntry (ChatEntryData &pair) {
|
|||
}
|
||||
|
||||
void ChatModel::insertCall (const shared_ptr<linphone::CallLog> &callLog) {
|
||||
linphone::CallStatus status = callLog->getStatus();
|
||||
|
||||
switch (status) {
|
||||
case linphone::CallStatusAborted:
|
||||
case linphone::CallStatusEarlyAborted:
|
||||
return; // Ignore aborted calls.
|
||||
case linphone::CallStatusSuccess:
|
||||
case linphone::CallStatusMissed:
|
||||
case linphone::CallStatusDeclined:
|
||||
break;
|
||||
}
|
||||
|
||||
auto insertEntry = [this](
|
||||
const ChatEntryData &pair,
|
||||
const QList<ChatEntryData>::iterator *start = NULL
|
||||
|
|
@ -538,12 +550,6 @@ void ChatModel::insertCall (const shared_ptr<linphone::CallLog> &callLog) {
|
|||
return it;
|
||||
};
|
||||
|
||||
linphone::CallStatus status = callLog->getStatus();
|
||||
|
||||
// Ignore aborted calls.
|
||||
if (status == linphone::CallStatusAborted)
|
||||
return;
|
||||
|
||||
// Add start call.
|
||||
QVariantMap start;
|
||||
fillCallStartEntry(start, callLog);
|
||||
|
|
|
|||
|
|
@ -35,6 +35,17 @@ Rectangle {
|
|||
onClicked: callControls.clicked()
|
||||
}
|
||||
|
||||
Icon {
|
||||
id: signIcon
|
||||
|
||||
anchors {
|
||||
left: parent.left
|
||||
top: parent.top
|
||||
}
|
||||
|
||||
iconSize: CallControlsStyle.signSize
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
anchors {
|
||||
fill: parent
|
||||
|
|
@ -66,14 +77,4 @@ Rectangle {
|
|||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
Icon {
|
||||
id: signIcon
|
||||
|
||||
anchors {
|
||||
left: parent.left
|
||||
top: parent.top
|
||||
}
|
||||
|
||||
iconSize: CallControlsStyle.signSize
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue