mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-02-07 15:08:24 +00:00
fix(src/components/notifier/Notifier): destroy call notification when call is terminated
This commit is contained in:
parent
2ef80f3166
commit
6a47380fc4
1 changed files with 4 additions and 3 deletions
|
|
@ -163,9 +163,10 @@ void Notifier::showNotification (QObject *notification, int timeout) {
|
|||
|
||||
void Notifier::deleteNotification (QVariant notification) {
|
||||
QObject *instance = notification.value<QObject *>();
|
||||
|
||||
instance->property(NOTIFICATION_PROPERTY_TIMER).value<QTimer *>()->stop();
|
||||
|
||||
qDebug() << "Delete notification.";
|
||||
|
||||
m_mutex.lock();
|
||||
|
||||
m_n_instances--;
|
||||
|
|
@ -215,9 +216,9 @@ void Notifier::notifyReceivedCall (const shared_ptr<linphone::Call> &call) {
|
|||
CallModel *model = CoreManager::getInstance()->getCallsListModel()->getCall(call);
|
||||
|
||||
QObject::connect(
|
||||
model, &CallModel::statusChanged, notification, [notification](CallModel::CallStatus status) {
|
||||
model, &CallModel::statusChanged, notification, [this, notification](CallModel::CallStatus status) {
|
||||
if (status == CallModel::CallStatusEnded)
|
||||
notification->findChild<QQuickWindow *>()->setVisible(false);
|
||||
deleteNotification(QVariant::fromValue(notification));
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue