From eb42cf77ceaf5023344e168a6bf94146f69b5be5 Mon Sep 17 00:00:00 2001 From: Daniele Gobbetti Date: Sun, 11 Sep 2016 18:42:05 +0200 Subject: Use the last message in the content text instead of the first. This fixes the issue where the first message in the notification was sent to pebble (and possibly to other wear devices) for every update in the conversation, as reported in #1249. This is the same patch propoed in https://github.com/siacs/Conversations/issues/1249#issuecomment-245878335 --- src/main/java/de/pixart/messenger/services/NotificationService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/de/pixart/messenger/services/NotificationService.java b/src/main/java/de/pixart/messenger/services/NotificationService.java index 115732366..b07d5aaf1 100644 --- a/src/main/java/de/pixart/messenger/services/NotificationService.java +++ b/src/main/java/de/pixart/messenger/services/NotificationService.java @@ -388,7 +388,7 @@ public class NotificationService { builder.setStyle(messagingStyle); } else { builder.setStyle(new NotificationCompat.BigTextStyle().bigText(getMergedBodies(messages))); - builder.setContentText(UIHelper.getMessagePreview(mXmppConnectionService, messages.get(0)).first); + builder.setContentText(UIHelper.getMessagePreview(mXmppConnectionService, messages.get((messages.size()-1))).first); } } -- cgit v1.2.3