[FIX] Markdown not rendering as preview for threaded messages (#3465)
* Use older preview logic * Stories
This commit is contained in:
parent
e98caea40b
commit
e0a0a31257
|
@ -18121,6 +18121,26 @@ exports[`Storyshots Markdown Preview 1`] = `
|
||||||
>
|
>
|
||||||
Testing: 😃 👍 :marioparty:
|
Testing: 😃 👍 :marioparty:
|
||||||
</Text>
|
</Text>
|
||||||
|
<Text
|
||||||
|
accessibilityLabel="Fallback from new md to old"
|
||||||
|
numberOfLines={1}
|
||||||
|
style={
|
||||||
|
Array [
|
||||||
|
Object {
|
||||||
|
"backgroundColor": "transparent",
|
||||||
|
"fontFamily": "System",
|
||||||
|
"fontSize": 16,
|
||||||
|
"fontWeight": "400",
|
||||||
|
"textAlign": "left",
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"color": "#2f343d",
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
>
|
||||||
|
Fallback from new md to old
|
||||||
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|
|
@ -369,7 +369,7 @@ class Markdown extends PureComponent<IMarkdownProps, any> {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.isNewMarkdown) {
|
if (this.isNewMarkdown && !preview) {
|
||||||
return (
|
return (
|
||||||
<NewMarkdown
|
<NewMarkdown
|
||||||
username={username}
|
username={username}
|
||||||
|
|
|
@ -80,6 +80,24 @@ stories.add('Preview', () => (
|
||||||
username='rocket.cat'
|
username='rocket.cat'
|
||||||
/>
|
/>
|
||||||
<Markdown msg='Testing: 😃 :+1: :marioparty:' getCustomEmoji={getCustomEmoji} theme={theme} numberOfLines={1} preview />
|
<Markdown msg='Testing: 😃 :+1: :marioparty:' getCustomEmoji={getCustomEmoji} theme={theme} numberOfLines={1} preview />
|
||||||
|
<Markdown
|
||||||
|
msg='Fallback from new md to old'
|
||||||
|
getCustomEmoji={getCustomEmoji}
|
||||||
|
theme={theme}
|
||||||
|
numberOfLines={1}
|
||||||
|
preview
|
||||||
|
md={[
|
||||||
|
{
|
||||||
|
type: 'PARAGRAPH',
|
||||||
|
value: [
|
||||||
|
{
|
||||||
|
type: 'PLAIN_TEXT',
|
||||||
|
value: 'This is Rocket.Chat'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]}
|
||||||
|
/>
|
||||||
</View>
|
</View>
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue