Fix conversation header position.

This commit is contained in:
Michelle Tang
2025-03-19 11:18:38 -04:00
committed by Cody Henthorne
parent 2d9135da93
commit c1f96e5bd3
5 changed files with 15 additions and 20 deletions

View File

@@ -307,6 +307,9 @@ public class ConversationHeaderView extends ConstraintLayout {
if (getBackground() != null) {
ViewUtil.setPaddingTop(binding.messageRequestInfo, 0);
ViewUtil.setPaddingBottom(binding.messageRequestInfo, getContext().getResources().getDimensionPixelOffset(R.dimen.conversation_header_padding));
int margin = getContext().getResources().getDimensionPixelOffset(R.dimen.conversation_header_margin);
ViewUtil.setLeftMargin(this, margin);
ViewUtil.setRightMargin(this, margin);
}
int padding = visibleCount == 1 ? getContext().getResources().getDimensionPixelOffset(R.dimen.conversation_header_padding) : getContext().getResources().getDimensionPixelOffset(R.dimen.conversation_header_padding_expanded);

View File

@@ -531,7 +531,7 @@ class ConversationAdapterV2(
}
inner class ThreadHeaderViewHolder(itemView: View) : MappingViewHolder<ThreadHeader>(itemView) {
private val conversationBanner: ConversationHeaderView = itemView.findViewById(R.id.header)
private val conversationBanner: ConversationHeaderView = itemView as ConversationHeaderView
override fun bind(model: ThreadHeader) {
val (recipient, groupInfo, sharedGroups, messageRequestState) = model.recipientInfo