diff options
author | Daniel Gultsch <inputmice@siacs.eu> | 2015-02-07 12:29:17 +0100 |
---|---|---|
committer | Daniel Gultsch <inputmice@siacs.eu> | 2015-02-07 12:29:17 +0100 |
commit | 00b2e30938a2a185e4c786fc683b60cf47774019 (patch) | |
tree | 2c49c74cc7c74875e9610f2072eeb92aee8c8783 /src/main/java | |
parent | e1e09d5cba9374935d8c872ead21131f5dd61625 (diff) |
trim message bodys on display
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/eu/siacs/conversations/entities/Message.java | 4 | ||||
-rw-r--r-- | src/main/java/eu/siacs/conversations/utils/UIHelper.java | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/eu/siacs/conversations/entities/Message.java b/src/main/java/eu/siacs/conversations/entities/Message.java index 8112f5de2..ce421ceb6 100644 --- a/src/main/java/eu/siacs/conversations/entities/Message.java +++ b/src/main/java/eu/siacs/conversations/entities/Message.java @@ -376,9 +376,9 @@ public class Message extends AbstractEntity { public String getMergedBody() { final Message next = this.next(); if (this.mergeable(next)) { - return getBody() + '\n' + next.getMergedBody(); + return getBody().trim() + '\n' + next.getMergedBody(); } - return getBody(); + return getBody().trim(); } public boolean hasMeCommand() { diff --git a/src/main/java/eu/siacs/conversations/utils/UIHelper.java b/src/main/java/eu/siacs/conversations/utils/UIHelper.java index 235ef84c9..e36c169bb 100644 --- a/src/main/java/eu/siacs/conversations/utils/UIHelper.java +++ b/src/main/java/eu/siacs/conversations/utils/UIHelper.java @@ -154,7 +154,7 @@ public class UIHelper { return new Pair<>(message.getBody().replaceAll("^" + Message.ME_COMMAND, UIHelper.getMessageDisplayName(message) + " "), false); } else { - return new Pair<>(message.getBody(), false); + return new Pair<>(message.getBody().trim(), false); } } } |