Fixed truncating messages

This commit is contained in:
M66B 2020-02-16 10:56:27 +01:00
parent 841bad56ca
commit 395273670b
2 changed files with 3 additions and 4 deletions

View File

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

View File

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