[FIX] Unify attachment rendering logic (#4260)
* fix verification adding fields logic * update snapshot * Change order for both logics * Cleanup Co-authored-by: Diego Mello <diegolmello@gmail.com>
This commit is contained in:
parent
6220375f7b
commit
329e74b720
|
@ -22,9 +22,6 @@ import { useTheme } from '../../theme';
|
||||||
import RightIcons from './Components/RightIcons';
|
import RightIcons from './Components/RightIcons';
|
||||||
|
|
||||||
const MessageInner = React.memo((props: IMessageInner) => {
|
const MessageInner = React.memo((props: IMessageInner) => {
|
||||||
const { attachments } = props;
|
|
||||||
const isCollapsible = attachments ? attachments[0] && attachments[0].collapsed : false;
|
|
||||||
|
|
||||||
if (props.type === 'discussion-created') {
|
if (props.type === 'discussion-created') {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
@ -58,18 +55,10 @@ const MessageInner = React.memo((props: IMessageInner) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<User {...props} />
|
<User {...props} />
|
||||||
{isCollapsible ? (
|
|
||||||
<>
|
<>
|
||||||
<Content {...props} />
|
<Content {...props} />
|
||||||
<Attachments {...props} />
|
<Attachments {...props} />
|
||||||
</>
|
</>
|
||||||
) : (
|
|
||||||
<>
|
|
||||||
<Attachments {...props} />
|
|
||||||
<Content {...props} />
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
|
|
||||||
<Urls {...props} />
|
<Urls {...props} />
|
||||||
<Thread {...props} />
|
<Thread {...props} />
|
||||||
<Reactions {...props} />
|
<Reactions {...props} />
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue