import React from 'react'; import PropTypes from 'prop-types'; import { View } from 'react-native'; import Touchable from 'react-native-platform-touchable'; import User from './User'; import styles from './styles'; import RepliedThread from './RepliedThread'; import MessageAvatar from './MessageAvatar'; import Attachments from './Attachments'; import Urls from './Urls'; import Thread from './Thread'; import Reactions from './Reactions'; import Broadcast from './Broadcast'; import Discussion from './Discussion'; import Content from './Content'; import ReadReceipt from './ReadReceipt'; import CallButton from './CallButton'; const MessageInner = React.memo((props) => { if (props.type === 'discussion-created') { return ( <> ); } if (props.type === 'jitsi_call_started') { return ( <> ); } return ( <> ); }); MessageInner.displayName = 'MessageInner'; const Message = React.memo((props) => { if (props.isThreadReply || props.isThreadSequential || props.isInfo) { const thread = props.isThreadReply ? : null; return ( {thread} ); } return ( ); }); Message.displayName = 'Message'; const MessageTouchable = React.memo((props) => { if (props.hasError) { return ( ); } return ( ); }); MessageTouchable.displayName = 'MessageTouchable'; MessageTouchable.propTypes = { hasError: PropTypes.bool, isInfo: PropTypes.bool, isTemp: PropTypes.bool, archived: PropTypes.bool, onLongPress: PropTypes.func, onPress: PropTypes.func }; Message.propTypes = { isThreadReply: PropTypes.bool, isThreadSequential: PropTypes.bool, isInfo: PropTypes.bool, isTemp: PropTypes.bool, isHeader: PropTypes.bool, hasError: PropTypes.bool, style: PropTypes.any, onLongPress: PropTypes.func, onPress: PropTypes.func, isReadReceiptEnabled: PropTypes.bool, unread: PropTypes.bool, theme: PropTypes.string }; MessageInner.propTypes = { type: PropTypes.string }; export default MessageTouchable;