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

This commit is contained in:
Ronan Abhamon 2017-04-28 09:55:28 +02:00
parent 9d8b263218
commit 69f114e5b6
2 changed files with 23 additions and 16 deletions

View file

@ -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);

View file

@ -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
}
}