From 9f1ae8249819aad8ab8afe716884489d7b565fc7 Mon Sep 17 00:00:00 2001 From: Julien Wadel Date: Thu, 4 Jun 2020 11:54:26 +0200 Subject: [PATCH] Show all call logs : Aborted calls and other devices calls - When Aborted : print as a normal call - When Early Aborted : print as missed - When Accepted on other device : print as a normal call - When Declined on other device : print as declined --- linphone-app/src/components/chat/ChatModel.cpp | 2 -- linphone-app/src/components/chat/ChatModel.hpp | 6 +++++- linphone-app/ui/modules/Linphone/Chat/Event.qml | 12 ++++++++++++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/linphone-app/src/components/chat/ChatModel.cpp b/linphone-app/src/components/chat/ChatModel.cpp index db3a713c4..095d75943 100644 --- a/linphone-app/src/components/chat/ChatModel.cpp +++ b/linphone-app/src/components/chat/ChatModel.cpp @@ -700,11 +700,9 @@ void ChatModel::insertCall (const shared_ptr &callLog) { switch (status) { case linphone::Call::Status::Aborted: case linphone::Call::Status::EarlyAborted: - return; // Ignore aborted calls. case linphone::Call::Status::AcceptedElsewhere: case linphone::Call::Status::DeclinedElsewhere: - return; // Ignore accepted calls on other device. case linphone::Call::Status::Success: case linphone::Call::Status::Missed: diff --git a/linphone-app/src/components/chat/ChatModel.hpp b/linphone-app/src/components/chat/ChatModel.hpp index ec1b85704..b0d79b57f 100644 --- a/linphone-app/src/components/chat/ChatModel.hpp +++ b/linphone-app/src/components/chat/ChatModel.hpp @@ -51,7 +51,11 @@ public: enum CallStatus { CallStatusDeclined = int(linphone::Call::Status::Declined), CallStatusMissed = int(linphone::Call::Status::Missed), - CallStatusSuccess = int(linphone::Call::Status::Success) + CallStatusSuccess = int(linphone::Call::Status::Success), + CallStatusAborted = int(linphone::Call::Status::Aborted), + CallStatusEarlyAborted = int(linphone::Call::Status::EarlyAborted), + CallStatusAcceptedElsewhere = int(linphone::Call::Status::AcceptedElsewhere), + CallStatusDeclinedElsewhere = int(linphone::Call::Status::DeclinedElsewhere) }; Q_ENUM(CallStatus); diff --git a/linphone-app/ui/modules/Linphone/Chat/Event.qml b/linphone-app/ui/modules/Linphone/Chat/Event.qml index 4026a6efd..58093cc19 100644 --- a/linphone-app/ui/modules/Linphone/Chat/Event.qml +++ b/linphone-app/ui/modules/Linphone/Chat/Event.qml @@ -23,6 +23,18 @@ Row { if (status === ChatModel.CallStatusMissed) { return $chatEntry.isOutgoing ? 'missed_outgoing_call' : 'missed_incoming_call' } + if (status === ChatModel.CallStatusAborted) { + return $chatEntry.isOutgoing ? 'outgoing_call' : 'incoming_call' + } + if (status === ChatModel.CallStatusEarlyAborted) { + return $chatEntry.isOutgoing ? 'missed_outgoing_call' : 'missed_incoming_call' + } + if (status === ChatModel.CallStatusAcceptedElsewhere) { + return $chatEntry.isOutgoing ? 'outgoing_call' : 'incoming_call' + } + if (status === ChatModel.CallStatusDeclinedElsewhere) { + return $chatEntry.isOutgoing ? 'declined_outgoing_call' : 'declined_incoming_call' + } return 'unknown_call_event' }