diff options
author | 2016-10-19 15:56:01 +0300 | |
---|---|---|
committer | 2016-10-19 15:56:01 +0300 | |
commit | fabdccb6f9da49058a72ce69674ffcfe51f53002 (patch) | |
tree | d3d9944f5916f6913489f26fe3e882934bcb9422 /juick-core/src/main/java/com/juick/formatters/PlainTextFormatter.java | |
parent | 36c679330d1bc0c6f0dfd7ec3dd1fb631259a8d9 (diff) |
protocol: fix reply quote
Diffstat (limited to 'juick-core/src/main/java/com/juick/formatters/PlainTextFormatter.java')
-rw-r--r-- | juick-core/src/main/java/com/juick/formatters/PlainTextFormatter.java | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/juick-core/src/main/java/com/juick/formatters/PlainTextFormatter.java b/juick-core/src/main/java/com/juick/formatters/PlainTextFormatter.java index 37b0c6d3..6c712d28 100644 --- a/juick-core/src/main/java/com/juick/formatters/PlainTextFormatter.java +++ b/juick-core/src/main/java/com/juick/formatters/PlainTextFormatter.java @@ -10,7 +10,7 @@ public class PlainTextFormatter { StringBuilder sb = new StringBuilder(); boolean isReply = jmsg.getRID() > 0; String title = isReply ? "Reply by @" : "@"; - String subtitle = isReply ? getReplyQuote(jmsg) : jmsg.getTagsString(); + String subtitle = isReply ? jmsg.getReplyQuote() : jmsg.getTagsString(); sb.append(title).append(jmsg.getUser().getUName()).append(":\n") .append(subtitle).append("\n").append(jmsg.getText()).append("\n"); if (jmsg.Photo != null) { @@ -25,14 +25,4 @@ public class PlainTextFormatter { } return "https://juick.com/" + jmsg.getMID(); } - - private static String getReplyQuote(Message msg) { - String quote = msg.getText(); - if (quote.length() > 50) { - quote = ">" + quote.substring(0, 47).replace('\n', ' ') + "...\n"; - } else if (quote.length() > 0) { - quote = ">" + quote.replace('\n', ' ') + "\n"; - } - return quote; - } } |