Commit 69f114e5 authored by Ronan Abhamon's avatar Ronan Abhamon

fix(src/components/chat/ChatModel): handle aborted call events

parent 9d8b2632
...@@ -518,6 +518,18 @@ void ChatModel::removeEntry (ChatEntryData &pair) { ...@@ -518,6 +518,18 @@ void ChatModel::removeEntry (ChatEntryData &pair) {
} }
void ChatModel::insertCall (const shared_ptr<linphone::CallLog> &callLog) { 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]( auto insertEntry = [this](
const ChatEntryData &pair, const ChatEntryData &pair,
const QList<ChatEntryData>::iterator *start = NULL const QList<ChatEntryData>::iterator *start = NULL
...@@ -538,12 +550,6 @@ void ChatModel::insertCall (const shared_ptr<linphone::CallLog> &callLog) { ...@@ -538,12 +550,6 @@ void ChatModel::insertCall (const shared_ptr<linphone::CallLog> &callLog) {
return it; return it;
}; };
linphone::CallStatus status = callLog->getStatus();
// Ignore aborted calls.
if (status == linphone::CallStatusAborted)
return;
// Add start call. // Add start call.
QVariantMap start; QVariantMap start;
fillCallStartEntry(start, callLog); fillCallStartEntry(start, callLog);
......
...@@ -35,6 +35,17 @@ Rectangle { ...@@ -35,6 +35,17 @@ Rectangle {
onClicked: callControls.clicked() onClicked: callControls.clicked()
} }
Icon {
id: signIcon
anchors {
left: parent.left
top: parent.top
}
iconSize: CallControlsStyle.signSize
}
RowLayout { RowLayout {
anchors { anchors {
fill: parent fill: parent
...@@ -66,14 +77,4 @@ Rectangle { ...@@ -66,14 +77,4 @@ Rectangle {
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
Icon {
id: signIcon
anchors {
left: parent.left
top: parent.top
}
iconSize: CallControlsStyle.signSize
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment