Fix group message UI

This commit is contained in:
Niels Andriesse
2019-08-06 10:22:05 +10:00
parent 3a5f5a9a41
commit 8ad0069fec
2 changed files with 7 additions and 1 deletions

View File

@@ -678,6 +678,12 @@ public class ConversationItem extends LinearLayout
}
private void setContactPhoto(@NonNull Recipient recipient) {
LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams)bodyBubble.getLayoutParams();
float scale = getResources().getDisplayMetrics().density;
float marginInDP = groupThread ? 44 : 8;
int marginInPX = Math.round(marginInDP * scale);
layoutParams.setMarginStart(marginInPX);
bodyBubble.setLayoutParams(layoutParams);
if (contactPhoto == null) return;
contactPhoto.setAvatar(glideRequests, recipient, true);
}