Fixed truncating messages

pull/174/head
M66B 6 years ago
parent 841bad56ca
commit 395273670b

@ -1738,6 +1738,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
if (show_full) { if (show_full) {
if (HtmlHelper.truncate(document, false)) if (HtmlHelper.truncate(document, false))
document.body() document.body()
.appendElement("br")
.appendElement("p") .appendElement("p")
.appendElement("em") .appendElement("em")
.text(context.getString(R.string.title_truncated)); .text(context.getString(R.string.title_truncated));

@ -330,6 +330,7 @@ public class HtmlHelper {
// Limit length // Limit length
if (truncate(parsed, true)) { if (truncate(parsed, true)) {
parsed.body() parsed.body()
.appendElement("br")
.appendElement("p") .appendElement("p")
.appendElement("em") .appendElement("em")
.text(context.getString(R.string.title_too_large)); .text(context.getString(R.string.title_too_large));
@ -1234,13 +1235,10 @@ public class HtmlHelper {
} }
} else { } else {
if (skip) if (skip)
child.remove(); tnode.text("");
} }
length += text.length(); length += text.length();
} else {
if (skip)
child.remove();
} }
} }

Loading…
Cancel
Save