Rocket.Chat.ReactNative/app/containers/message/ReadReceipt.js

23 lines
650 B
JavaScript
Raw Normal View History

import React from 'react';
import PropTypes from 'prop-types';
2019-12-04 16:39:53 +00:00
import { themes } from '../../constants/colors';
import { CustomIcon } from '../../lib/Icons';
import styles from './styles';
2019-12-04 16:39:53 +00:00
const ReadReceipt = React.memo(({ isReadReceiptEnabled, unread, theme }) => {
if (isReadReceiptEnabled && !unread && unread !== null) {
2019-12-04 16:39:53 +00:00
return <CustomIcon name='check' color={themes[theme].tintColor} size={15} style={styles.readReceipt} />;
}
return null;
});
ReadReceipt.displayName = 'MessageReadReceipt';
ReadReceipt.propTypes = {
isReadReceiptEnabled: PropTypes.bool,
2019-12-04 16:39:53 +00:00
unread: PropTypes.bool,
theme: PropTypes.bool
};
export default ReadReceipt;