Commit 501af459 authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Don't send our own notifications

Summary:
They were silent anyway and are not really useful
BUG: 402490

Test Plan: I don't see the MPRIS notification in the plasmoid any more

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D17776
parent cd5bc171
......@@ -194,14 +194,13 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
return;
}
NetworkPacket np = new NetworkPacket(PACKET_TYPE_NOTIFICATION);
if (packageName.equals("org.kde.kdeconnect_tp")) {
//Make our own notifications silent :)
np.set("silent", true);
np.set("requestAnswer", true); //For compatibility with old desktop versions of KDE Connect that don't support "silent"
if ("org.kde.kdeconnect_tp".equals(packageName)) {
// Don't send our own notifications
return;
}
NetworkPacket np = new NetworkPacket(PACKET_TYPE_NOTIFICATION);
boolean isUpdate = currentNotifications.contains(key);
if (!isUpdate) {
//If it's an update, the other end should have the icon already: no need to extract it and create the payload again
......
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