mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-26 00:08:13 +00:00
feat(src/components/notifier/Notifier): hide call notification when call is ended
This commit is contained in:
parent
2b5cb6bc64
commit
17877a8583
1 changed files with 10 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue