diff --git a/native/chat/chat-constants.js b/native/chat/chat-constants.js --- a/native/chat/chat-constants.js +++ b/native/chat/chat-constants.js @@ -23,6 +23,11 @@ topOffset: -10, }; +export const inlineEngagementLabelStyle = { + height: 16, + topOffset: 8, +}; + export const clusterEndHeight = 7; export const avatarOffset = 32; diff --git a/native/chat/inline-engagement.react.js b/native/chat/inline-engagement.react.js --- a/native/chat/inline-engagement.react.js +++ b/native/chat/inline-engagement.react.js @@ -14,6 +14,7 @@ import type { ThreadInfo } from 'lib/types/thread-types.js'; import { + inlineEngagementLabelStyle, inlineEngagementStyle, inlineEngagementCenterStyle, inlineEngagementRightStyle, @@ -28,8 +29,6 @@ import { useStyles } from '../themes/colors.js'; import type { ChatMessageInfoItemWithHeight } from '../types/chat-types.js'; -const editedLabelHeight = 24; - type Props = { +threadInfo: ?ThreadInfo, +reactions?: ReactionInfo, @@ -243,7 +242,8 @@ color: 'messageLabel', paddingHorizontal: 3, fontSize: 13, - top: 10, + top: inlineEngagementLabelStyle.topOffset, + height: inlineEngagementLabelStyle.height, }, messageLabelLeft: { marginLeft: 9, @@ -339,4 +339,4 @@ ); } -export { InlineEngagement, TooltipInlineEngagement, editedLabelHeight }; +export { InlineEngagement, TooltipInlineEngagement }; diff --git a/native/chat/utils.js b/native/chat/utils.js --- a/native/chat/utils.js +++ b/native/chat/utils.js @@ -11,10 +11,13 @@ import { viewerIsMember } from 'lib/shared/thread-utils.js'; import type { ThreadInfo } from 'lib/types/thread-types.js'; -import { clusterEndHeight, inlineEngagementStyle } from './chat-constants.js'; +import { + inlineEngagementLabelStyle, + clusterEndHeight, + inlineEngagementStyle, +} from './chat-constants.js'; import { ChatContext, useHeightMeasurer } from './chat-context.js'; import { failedSendHeight } from './failed-send.react.js'; -import { editedLabelHeight } from './inline-engagement.react.js'; import { useNativeMessageListData, type NativeChatMessageItem, @@ -80,7 +83,10 @@ inlineEngagementStyle.marginTop + inlineEngagementStyle.marginBottom; } else if (label) { - height += editedLabelHeight; + height += + inlineEngagementLabelStyle.height + + inlineEngagementStyle.marginTop + + inlineEngagementStyle.marginBottom; } return height; }