Update MessageObject.java

sometimes when we have a lot of space and also mix of RTL and LTR characters background width will be more than display width.
This commit is contained in:
Faraz Khonsari 2020-10-24 18:29:47 +03:30 committed by GitHub
parent 19599e6ea4
commit 97fec7ab12
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4055,6 +4055,8 @@ public class MessageObject {
linesMaxWidth = Math.max(linesMaxWidth, (int) Math.ceil(lineWidth));
linesMaxWidthWithLeft = Math.max(linesMaxWidthWithLeft, (int) Math.ceil(lineWidth + lineLeft));
}
lastLineWidthWithLeft = Math.min(lastLineWidthWithLeft, maxWidth);
textRealMaxWidthWithLeft = Math.min(textRealMaxWidthWithLeft, maxWidth);
if (hasNonRTL) {
textRealMaxWidth = textRealMaxWidthWithLeft;
if (a == blocksCount - 1) {