diff options
author | Christian Schneppe <christian@pix-art.de> | 2016-05-29 10:09:48 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2016-05-29 10:09:48 +0200 |
commit | 04ceeec4b302a23f14d73e4d6e479ebf28145c8e (patch) | |
tree | fb537bca00a09b672fb1449f58c7d31b4dc9da60 /src/main/java/eu/siacs/conversations/ui/adapter | |
parent | 35bf89e154ed7ac26e538fb908a96fc99e9b441d (diff) | |
parent | 2c55954ddda1d84a32150b430fe80ff8084612a1 (diff) |
Merge remote-tracking branch 'refs/remotes/siacs/master'
Diffstat (limited to 'src/main/java/eu/siacs/conversations/ui/adapter')
-rw-r--r-- | src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java index a22a4bb7f..f2f68a321 100644 --- a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java +++ b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java @@ -43,6 +43,7 @@ import java.util.regex.MatchResult; import java.util.regex.Matcher; import java.util.regex.Pattern; +import eu.siacs.conversations.Config; import eu.siacs.conversations.R; import eu.siacs.conversations.crypto.axolotl.XmppAxolotlSession; import eu.siacs.conversations.entities.Account; @@ -318,6 +319,9 @@ public class MessageAdapter extends ArrayAdapter<Message> { } catch (ArrayIndexOutOfBoundsException e) { body = message.getMergedBody(); } + if (body.length() > Config.MAX_DISPLAY_MESSAGE_CHARS) { + body = body.substring(0, Config.MAX_DISPLAY_MESSAGE_CHARS)+"\u2026"; + } final SpannableString formattedBody = new SpannableString(body); int i = body.indexOf(Message.MERGE_SEPARATOR); while(i >= 0) { |