2019-06-10 18:36:31 +00:00
|
|
|
import React from 'react';
|
|
|
|
|
2022-05-30 22:02:08 +00:00
|
|
|
import { themes } from '../../../../lib/constants';
|
|
|
|
import { CustomIcon } from '../../../CustomIcon';
|
|
|
|
import styles from '../../styles';
|
|
|
|
import { useTheme } from '../../../../theme';
|
2019-06-10 18:36:31 +00:00
|
|
|
|
2022-04-28 18:45:00 +00:00
|
|
|
const ReadReceipt = React.memo(({ isReadReceiptEnabled, unread }: { isReadReceiptEnabled?: boolean; unread: boolean }) => {
|
|
|
|
const { theme } = useTheme();
|
2019-06-10 18:36:31 +00:00
|
|
|
if (isReadReceiptEnabled && !unread && unread !== null) {
|
2022-05-30 22:02:08 +00:00
|
|
|
return <CustomIcon name='check' color={themes[theme].tintColor} size={16} style={styles.rightIcons} />;
|
2019-06-10 18:36:31 +00:00
|
|
|
}
|
|
|
|
return null;
|
|
|
|
});
|
|
|
|
ReadReceipt.displayName = 'MessageReadReceipt';
|
|
|
|
|
|
|
|
export default ReadReceipt;
|