diff --git a/linphone-desktop/src/components/notifier/Notifier.cpp b/linphone-desktop/src/components/notifier/Notifier.cpp index 2ef877033..a30c12a9d 100644 --- a/linphone-desktop/src/components/notifier/Notifier.cpp +++ b/linphone-desktop/src/components/notifier/Notifier.cpp @@ -212,8 +212,17 @@ void Notifier::notifyReceivedCall (const shared_ptr &call) { if (!notification) return; + CallModel *model = CoreManager::getInstance()->getCallsListModel()->getCall(call); + + QObject::connect( + model, &CallModel::statusChanged, notification, [notification](CallModel::CallStatus status) { + if (status == CallModel::CallStatusEnded) + notification->findChild()->setVisible(false); + } + ); + QVariantMap map; - map["call"].setValue(CoreManager::getInstance()->getCallsListModel()->getCall(call)); + map["call"].setValue(model); ::setProperty(*notification, NOTIFICATION_PROPERTY_DATA, map); showNotification(notification, NOTIFICATION_TIMEOUT_RECEIVED_CALL);