[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:
Gleidson Daniel Silva 2022-06-02 16:58:42 -03:00 committed by GitHub
parent 6220375f7b
commit 329e74b720
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 25 deletions

View File

@ -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} />
</>
)}
<Urls {...props} />
<Thread {...props} />
<Reactions {...props} />

File diff suppressed because one or more lines are too long