diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2016-12-23 21:19:11 +0100 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2016-12-23 21:19:11 +0100 |
commit | 28c64c2bd10263fc4370d3edf80a465dad46cd5a (patch) | |
tree | 3dcd6cc7bc675ca4e0a72c4314b6ccf4cafdd86d /src/main/java | |
parent | d03c431137107e7c8799804293cfaf2fe4138d9a (diff) |
skip empty lines in message preview. prevents indexoutofbounds exception
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/eu/siacs/conversations/utils/UIHelper.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/eu/siacs/conversations/utils/UIHelper.java b/src/main/java/eu/siacs/conversations/utils/UIHelper.java index ebb800d4..ae40fc08 100644 --- a/src/main/java/eu/siacs/conversations/utils/UIHelper.java +++ b/src/main/java/eu/siacs/conversations/utils/UIHelper.java @@ -201,6 +201,9 @@ public class UIHelper { char first = l.charAt(0); if (first != '>' && first != '\u00bb') { String line = l.trim(); + if (line.isEmpty()) { + continue; + } char last = line.charAt(line.length()-1); if (builder.length() != 0) { builder.append(' '); |