[plugins/telephony] Clear actions before creating new notification action

Otherwise we accumulate them

BUG: 479904
(cherry picked from commit 2e99c37122)
This commit is contained in:
Nicolas Fella 2024-01-17 00:57:50 +01:00
parent e77ce26cf8
commit 7f2bb148de

View file

@ -62,6 +62,7 @@ void TelephonyPlugin::createNotification(const NetworkPacket &np)
if (event == QLatin1String("ringing")) {
#if QT_VERSION_MAJOR == 6
m_currentCallNotification->clearActions();
KNotificationAction *muteAction = m_currentCallNotification->addAction(i18n("Mute Call"));
connect(muteAction, &KNotificationAction::activated, this, &TelephonyPlugin::sendMutePacket);
#else