2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-22 18:07:55 +00:00

Do not make all ONLY_ALERT_ONCE notifications silent

Propagate the flag to the desktop so we can use it there to do what it's
supposed to do.

Fixes Whatsapp notifications not showing up in the desktop.
This commit is contained in:
Albert Vaca Cintora 2020-01-05 22:48:08 +01:00
parent b3d91e083a
commit 510028d738

View File

@ -238,7 +238,7 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
np.set("actions", extractActions(notification, key)); np.set("actions", extractActions(notification, key));
np.set("id", key); np.set("id", key);
np.set("silent", (notification.flags & NotificationCompat.FLAG_ONLY_ALERT_ONCE) != 0); np.set("onlyOnce", (notification.flags & NotificationCompat.FLAG_ONLY_ALERT_ONCE) != 0);
np.set("isClearable", statusBarNotification.isClearable()); np.set("isClearable", statusBarNotification.isClearable());
np.set("appName", appName == null ? packageName : appName); np.set("appName", appName == null ? packageName : appName);
np.set("time", Long.toString(statusBarNotification.getPostTime())); np.set("time", Long.toString(statusBarNotification.getPostTime()));