[neon/mobile/plasma-dialer/Neon/unstable] debian/patches: add notification patch for time being

Carlos De Maine null at kde.org
Thu Jun 15 15:19:37 BST 2023


Git commit 7ace2ecceb4b13930367ea7b3846cff95151bb7f by Carlos De Maine.
Committed on 15/06/2023 at 14:19.
Pushed by carlosdem into branch 'Neon/unstable'.

add notification patch for time being

A  +35   -0    debian/patches/01_fix_notifications
A  +1    -0    debian/patches/series

https://invent.kde.org/neon/mobile/plasma-dialer/-/commit/7ace2ecceb4b13930367ea7b3846cff95151bb7f

diff --git a/debian/patches/01_fix_notifications b/debian/patches/01_fix_notifications
new file mode 100644
index 0000000..e6904bf
--- /dev/null
+++ b/debian/patches/01_fix_notifications
@@ -0,0 +1,35 @@
+diff --git a/kde-telephony-daemon/src/notification-manager.cpp b/kde-telephony-daemon/src/notification-manager.cpp
+index c5eef92d008338525ac3464eed9e2f13a9a256e1..0d5b89fdfd9c7cd9a6bf6d658e2953a61bb13264 100644
+--- a/kde-telephony-daemon/src/notification-manager.cpp
++++ b/kde-telephony-daemon/src/notification-manager.cpp
+@@ -160,8 +160,8 @@ void NotificationManager::openRingingNotification(const QString &deviceUni,
+     // with swipe decision.
+     _ringingNotification->setHint(QStringLiteral("category"), QStringLiteral("x-kde.incoming-call"));
+     _ringingNotification->setActions(actions);
+-    _ringingNotification->addContext(QStringLiteral("deviceUni"), deviceUni);
+-    _ringingNotification->addContext(QStringLiteral("callUni"), callUni);
++    _ringingNotification->setProperty("deviceUni", deviceUni);
++    _ringingNotification->setProperty("callUni", callUni);
+     connect(_ringingNotification.get(), QOverload<unsigned int>::of(&KNotification::activated), this, &NotificationManager::onNotificationAction);
+     _ringingNotification->sendEvent();
+ }
+@@ -298,17 +298,8 @@ void NotificationManager::stopHapticsFeedback()
+ void NotificationManager::onNotificationAction(unsigned int action)
+ {
+     qDebug() << Q_FUNC_INFO << action;
+-    QString deviceUni;
+-    QString callUni;
+-    KNotification::ContextList notificationContexts = _ringingNotification->contexts();
+-    for (const auto &context : notificationContexts) {
+-        if (context.first == QStringLiteral("deviceUni")) {
+-            deviceUni = context.second;
+-        }
+-        if (context.first == QStringLiteral("callUni")) {
+-            callUni = context.second;
+-        }
+-    }
++    const QString deviceUni = _ringingNotification->property("deviceUni").toString();
++    const QString callUni = _ringingNotification->property("callUni").toString();
+     switch (action) {
+     case 1:
+         accept(deviceUni, callUni);
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..8710465
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+01_fix_notifications
\ No newline at end of file


More information about the Neon-commits mailing list