Page MenuHomePhorge

D8845.1765342849.diff
No OneTemporary

Size
1006 B
Referenced Files
None
Subscribers
None

D8845.1765342849.diff

diff --git a/native/markdown/markdown-chat-mention.react.js b/native/markdown/markdown-chat-mention.react.js
new file mode 100644
--- /dev/null
+++ b/native/markdown/markdown-chat-mention.react.js
@@ -0,0 +1,30 @@
+// @flow
+
+import * as React from 'react';
+import { Text } from 'react-native';
+
+import type { ResolvedThreadInfo } from 'lib/types/thread-types.js';
+
+import { useMarkdownOnPressUtils } from './markdown-utils.js';
+
+type TextProps = React.ElementConfig<typeof Text>;
+type Props = {
+ +threadInfo: ResolvedThreadInfo,
+ +hasAccessToChat: boolean,
+ +children: React.Node,
+ ...TextProps,
+};
+function MarkdownChatMention(props: Props): React.Node {
+ const { threadInfo, hasAccessToChat, ...rest } = props;
+ const { shouldBePressable, onLongPressHandler } = useMarkdownOnPressUtils(
+ !hasAccessToChat,
+ );
+ return (
+ <Text
+ onLongPress={shouldBePressable ? onLongPressHandler : null}
+ {...rest}
+ />
+ );
+}
+
+export default MarkdownChatMention;

File Metadata

Mime Type
text/plain
Expires
Wed, Dec 10, 5:00 AM (16 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5861226
Default Alt Text
D8845.1765342849.diff (1006 B)

Event Timeline