Refactoring

This commit is contained in:
M66B
2018-12-24 20:09:47 +00:00
parent 4df54faed6
commit d515f1aafa
5 changed files with 19 additions and 19 deletions

View File

@@ -247,4 +247,9 @@ public class HtmlHelper {
Html.escapeHtml(MessageHelper.getFormattedAddresses(message.from, true)),
sanitize ? sanitize(html, true) : getBody(html));
}
static String getPreview(String body) {
String text = (body == null ? null : Jsoup.parse(body).text());
return (text == null ? null : text.substring(0, Math.min(text.length(), 250)));
}
}