Commit 17877a85 authored by Ronan Abhamon's avatar Ronan Abhamon

feat(src/components/notifier/Notifier): hide call notification when call is ended

parent 2b5cb6bc
......@@ -212,8 +212,17 @@ void Notifier::notifyReceivedCall (const shared_ptr<linphone::Call> &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<QQuickWindow *>()->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);
......
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