aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorDaniele Gobbetti <daniele+github@gobbetti.name>2016-09-11 18:42:05 +0200
committerChristian Schneppe <christian@pix-art.de>2016-09-14 21:26:57 +0200
commiteb42cf77ceaf5023344e168a6bf94146f69b5be5 (patch)
tree1d3a59a4bd5a18203fce0f7a92aca08c496cb1cf /src/main/java
parentdcbef7c5fdc808f5dfd3fbd6426f28da73498fab (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/de/pixart/messenger/services/NotificationService.java2
1 files changed, 1 insertions, 1 deletions
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);
}
}