Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32405614
D8845.1765342849.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1006 B
Referenced Files
None
Subscribers
None
D8845.1765342849.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D8845: [native] Introduce markdown component for chat mentions
Attached
Detach File
Event Timeline
Log In to Comment