mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-08-06 05:14:50 +01:00
Improve bubble UI for sticker replies.
This commit is contained in:
committed by
Michelle Tang
parent
600acb82bd
commit
c91b739c1b
@@ -725,6 +725,17 @@ public final class ConversationItem extends RelativeLayout implements BindableCo
|
||||
}
|
||||
}
|
||||
|
||||
if (hasSticker(messageRecord) && hasQuote(messageRecord) && stickerStub.resolved()) {
|
||||
int stickerWidth = stickerStub.get().getMeasuredWidth();
|
||||
if (stickerWidth > 0 && bodyBubble.getMeasuredWidth() > stickerWidth) {
|
||||
bodyBubble.getLayoutParams().width = stickerWidth;
|
||||
updatingFooter = false;
|
||||
lastFooterDecisionLineWidth = -1;
|
||||
lastFooterWasCollapsed = false;
|
||||
needsMeasure = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (needsMeasure) {
|
||||
if (measureCalls < MAX_MEASURE_CALLS) {
|
||||
measureCalls++;
|
||||
@@ -1102,7 +1113,7 @@ public final class ConversationItem extends RelativeLayout implements BindableCo
|
||||
}
|
||||
|
||||
private boolean hasNoBubble(MessageRecord messageRecord) {
|
||||
return MessageRecordUtil.hasNoBubble(messageRecord, context);
|
||||
return MessageRecordUtil.hasNoBubble(messageRecord, context) && !(hasSticker(messageRecord) && hasQuote(messageRecord));
|
||||
}
|
||||
|
||||
private boolean hasOnlyThumbnail(MessageRecord messageRecord) {
|
||||
@@ -1470,7 +1481,9 @@ public final class ConversationItem extends RelativeLayout implements BindableCo
|
||||
|
||||
footer.setVisibility(VISIBLE);
|
||||
} else if ((hasSticker(messageRecord) && isCaptionlessMms(messageRecord)) || isBorderless(messageRecord)) {
|
||||
bodyBubble.setBackgroundColor(Color.TRANSPARENT);
|
||||
if (hasNoBubble(messageRecord)) {
|
||||
bodyBubble.setBackgroundColor(Color.TRANSPARENT);
|
||||
}
|
||||
|
||||
stickerStub.get().setVisibility(View.VISIBLE);
|
||||
if (mediaThumbnailStub.resolved()) mediaThumbnailStub.require().setVisibility(View.GONE);
|
||||
|
||||
Reference in New Issue
Block a user