Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3353508
D5541.id18467.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D5541.id18467.diff
View Options
diff --git a/native/chat/inner-text-message.react.js b/native/chat/inner-text-message.react.js
--- a/native/chat/inner-text-message.react.js
+++ b/native/chat/inner-text-message.react.js
@@ -13,6 +13,7 @@
import { useColors, colors } from '../themes/colors';
import type { ChatTextMessageInfoItemWithHeight } from '../types/chat-types';
import { useComposedMessageMaxWidth } from './composed-message-width';
+import { MessageContext } from './message-context.react';
import { MessageListContext } from './message-list-types';
import {
allCorners,
@@ -101,6 +102,12 @@
return [styles.text, textStyle];
}, [darkColor]);
+ const messageContextValue = React.useMemo(() => {
+ return {
+ messageID: item.messageInfo.id ?? '',
+ };
+ }, [item.messageInfo.id]);
+
const message = (
<TouchableWithoutFeedback>
<View>
@@ -111,9 +118,11 @@
style={[styles.message, cornerStyle]}
animatedStyle={messageStyle}
>
- <Markdown style={markdownStyles} rules={rules}>
- {text}
- </Markdown>
+ <MessageContext.Provider value={messageContextValue}>
+ <Markdown style={markdownStyles} rules={rules}>
+ {text}
+ </Markdown>
+ </MessageContext.Provider>
</GestureTouchableOpacity>
</View>
</TouchableWithoutFeedback>
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 24, 10:02 AM (21 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2574763
Default Alt Text
D5541.id18467.diff (1 KB)
Attached To
Mode
D5541: [native] Maintain spoiler reveal state on message tap
Attached
Detach File
Event Timeline
Log In to Comment