diff options
author | Daniele Gobbetti <daniele+github@gobbetti.name> | 2016-09-11 18:42:05 +0200 |
---|---|---|
committer | Daniele Gobbetti <daniele+github@gobbetti.name> | 2016-09-11 18:42:05 +0200 |
commit | e6e46651c9ffee9a48bf98f63871c4ef5c1d33c9 (patch) | |
tree | 368046485560879ca2fc5e5f1f56e69e2f9c154c /src/main/java | |
parent | 75fcab31707cf73ec69207e1147ca911a6ded6ce (diff) |
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
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/eu/siacs/conversations/services/NotificationService.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/services/NotificationService.java b/src/main/java/eu/siacs/conversations/services/NotificationService.java index fe9215d4..7cfe2433 100644 --- a/src/main/java/eu/siacs/conversations/services/NotificationService.java +++ b/src/main/java/eu/siacs/conversations/services/NotificationService.java @@ -376,7 +376,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); } } |