Fix footer collapsing for single line messages.

fork-5.53.8
Rashad Sookram 2022-01-06 09:42:46 -05:00 zatwierdzone przez Alex Hart
rodzic d52c66d601
commit 449acaf9df
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -311,6 +311,8 @@ public final class ConversationItem extends RelativeLayout implements BindableCo
this.canPlayContent = false;
this.mediaItem = null;
this.colorizer = colorizer;
this.measureCalls = 0;
this.updatingFooter = false;
this.canCollapseFooter = true;
this.recipient.observeForever(this);
@ -439,7 +441,7 @@ public final class ConversationItem extends RelativeLayout implements BindableCo
}
}
if (!messageRecord.isFailed() && canCollapseFooter) {
if (!messageRecord.isFailed() && canCollapseFooter && !bodyText.isSingleLine()) {
if (bodyText.getLastLineWidth() + ViewUtil.dpToPx(6) + footerWidth <= bodyText.getMeasuredWidth()) {
ViewUtil.setTopMargin(footer, collapsedTopMargin);
ViewUtil.setBottomMargin(footer, collapsedBottomMargin);