Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F2832907
D7518.id25674.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D7518.id25674.diff
View Options
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;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Sep 29, 6:29 AM (11 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2199195
Default Alt Text
D7518.id25674.diff (2 KB)
Attached To
Mode
D7518: [native][fix] Fixed message height warnings on Android
Attached
Detach File
Event Timeline
Log In to Comment