Fix emoji misalignment (#1155)

This commit is contained in:
Andrew 2023-05-01 16:49:13 +09:30 committed by GitHub
parent a934c5c2e2
commit 83b6002a27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -203,10 +203,11 @@ public final class ConversationReactionOverlay extends FrameLayout {
boolean isMessageOnLeft) { boolean isMessageOnLeft) {
contextMenu = new ConversationContextMenu(dropdownAnchor, getMenuActionItems(messageRecord)); contextMenu = new ConversationContextMenu(dropdownAnchor, getMenuActionItems(messageRecord));
float itemX = isMessageOnLeft ? scrubberHorizontalMargin : float endX = isMessageOnLeft ? scrubberHorizontalMargin :
selectedConversationModel.getBubbleX() - conversationItem.getWidth() + selectedConversationModel.getBubbleWidth(); selectedConversationModel.getBubbleX() - conversationItem.getWidth() + selectedConversationModel.getBubbleWidth();
conversationItem.setX(itemX); float endY = selectedConversationModel.getBubbleY() - statusBarHeight;
conversationItem.setY(selectedConversationModel.getBubbleY() - statusBarHeight); conversationItem.setX(endX);
conversationItem.setY(endY);
Bitmap conversationItemSnapshot = selectedConversationModel.getBitmap(); Bitmap conversationItemSnapshot = selectedConversationModel.getBitmap();
boolean isWideLayout = contextMenu.getMaxWidth() + scrubberWidth < getWidth(); boolean isWideLayout = contextMenu.getMaxWidth() + scrubberWidth < getWidth();
@ -214,8 +215,6 @@ public final class ConversationReactionOverlay extends FrameLayout {
int overlayHeight = getHeight(); int overlayHeight = getHeight();
int bubbleWidth = selectedConversationModel.getBubbleWidth(); int bubbleWidth = selectedConversationModel.getBubbleWidth();
float endX = itemX;
float endY = conversationItem.getY();
float endApparentTop = endY; float endApparentTop = endY;
float endScale = 1f; float endScale = 1f;
@ -265,9 +264,7 @@ public final class ConversationReactionOverlay extends FrameLayout {
} }
} else { } else {
endY = overlayHeight - contextMenu.getMaxHeight() - menuPadding - conversationItemSnapshot.getHeight(); endY = overlayHeight - contextMenu.getMaxHeight() - menuPadding - conversationItemSnapshot.getHeight();
reactionBarBackgroundY = endY - reactionBarHeight - menuPadding;
float contextMenuTop = endY + conversationItemSnapshot.getHeight();
reactionBarBackgroundY = getReactionBarOffsetForTouch(selectedConversationModel.getBubbleY(), contextMenuTop, menuPadding, reactionBarOffset, reactionBarHeight, reactionBarTopPadding, endY);
} }
endApparentTop = endY; endApparentTop = endY;