[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';
|
||||
|
||||
const MessageInner = React.memo((props: IMessageInner) => {
|
||||
const { attachments } = props;
|
||||
const isCollapsible = attachments ? attachments[0] && attachments[0].collapsed : false;
|
||||
|
||||
if (props.type === 'discussion-created') {
|
||||
return (
|
||||
<>
|
||||
|
@ -58,18 +55,10 @@ const MessageInner = React.memo((props: IMessageInner) => {
|
|||
return (
|
||||
<>
|
||||
<User {...props} />
|
||||
{isCollapsible ? (
|
||||
<>
|
||||
<Content {...props} />
|
||||
<Attachments {...props} />
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<Attachments {...props} />
|
||||
<Content {...props} />
|
||||
</>
|
||||
)}
|
||||
|
||||
<>
|
||||
<Content {...props} />
|
||||
<Attachments {...props} />
|
||||
</>
|
||||
<Urls {...props} />
|
||||
<Thread {...props} />
|
||||
<Reactions {...props} />
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue