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

22 lines
619 B
TypeScript
Raw Normal View History

import React from 'react';
2019-12-04 16:39:53 +00:00
import { themes } from '../../constants/colors';
import { CustomIcon } from '../../lib/Icons';
import styles from './styles';
interface IMessageReadReceipt {
isReadReceiptEnabled: boolean;
unread: boolean;
theme: string;
}
const ReadReceipt = React.memo(({ isReadReceiptEnabled, unread, theme }: IMessageReadReceipt) => {
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';
export default ReadReceipt;