1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-01-02 13:14:39 +00:00

Set wearable dismissal ID

This commit is contained in:
M66B 2019-10-21 16:56:55 +02:00
parent f0060fa8bb
commit 565ad98db6

View file

@ -2876,8 +2876,9 @@ class Core {
ContactInfo info = messageContact.get(message);
// Build arguments
long id = (message.content ? message.id : -message.id);
Bundle args = new Bundle();
args.putLong("id", message.content ? message.id : -message.id);
args.putLong("id", id);
// Build pending intents
Intent thread = new Intent(context, ActivityView.class);
@ -3076,10 +3077,6 @@ class Core {
wactions.add(actionSnooze.build());
}
if (wactions.size() > 0)
mbuilder.extend(new NotificationCompat.WearableExtender()
.addActions(wactions));
if (message.content && notify_preview) {
// Wearables
StringBuilder sb = new StringBuilder();
@ -3124,6 +3121,12 @@ class Core {
mbuilder.setColorized(true);
}
// https://developer.android.com/training/wearables/notifications
// https://developer.android.com/reference/android/app/Notification.WearableExtender
mbuilder.extend(new NotificationCompat.WearableExtender()
.addActions(wactions)
.setDismissalId(BuildConfig.APPLICATION_ID + ":" + id));
notifications.add(mbuilder);
}