From 40bd8cb66ca2377ba6b916b63803aa15703f2a88 Mon Sep 17 00:00:00 2001 From: Julien Wadel Date: Wed, 1 Feb 2023 13:44:26 +0100 Subject: [PATCH] Close notification when declining incoming call. Call status wasn't propagated when removing it. --- CHANGELOG.md | 5 +++++ linphone-app/src/components/call/CallModel.cpp | 1 + linphone-app/src/components/notifier/Notifier.cpp | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f24e915d..701386a8d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - File viewer in chats (Image/Animated Image/Video/Texts) with the option to export the file. - Accept/decline CLI commands. +## 5.0.10 - undefined + +### Fixed +- Blank notification when declining incoming call. + ## 5.0.9 - 2023-01-31 ### Fixed diff --git a/linphone-app/src/components/call/CallModel.cpp b/linphone-app/src/components/call/CallModel.cpp index dd8952ea1..f000c5453 100644 --- a/linphone-app/src/components/call/CallModel.cpp +++ b/linphone-app/src/components/call/CallModel.cpp @@ -134,6 +134,7 @@ CallModel::~CallModel () { } void CallModel::removeCall(){ + emit statusChanged(getStatus()); if(mCall){ mCall->removeListener(mCallListener); mConferenceModel = nullptr;// Ordering deletion. diff --git a/linphone-app/src/components/notifier/Notifier.cpp b/linphone-app/src/components/notifier/Notifier.cpp index 13f8bab07..0e2f1d95e 100644 --- a/linphone-app/src/components/notifier/Notifier.cpp +++ b/linphone-app/src/components/notifier/Notifier.cpp @@ -324,7 +324,7 @@ void Notifier::notifyReceivedCall (const shared_ptr &call) { map["call"].setValue(callModel); CREATE_NOTIFICATION(Notifier::ReceivedCall, map) - QObject::connect(callModel, &CallModel::statusChanged, notification, [this, notification](CallModel::CallStatus status) { + QObject::connect(callModel, &CallModel::statusChanged, notification, [this, notification](CallModel::CallStatus status) { if (status == CallModel::CallStatusEnded || status == CallModel::CallStatusConnected) deleteNotification(QVariant::fromValue(notification)); });