[FIX] Show read receipts when it isn't read yet (#4865)
* [FIX] Show read receipts when it isn't read yet * minor tweak
This commit is contained in:
parent
21e4818af7
commit
a927746d7f
File diff suppressed because one or more lines are too long
|
@ -1,14 +1,20 @@
|
|||
import React from 'react';
|
||||
|
||||
import { themes } from '../../../../lib/constants';
|
||||
import { CustomIcon } from '../../../CustomIcon';
|
||||
import styles from '../../styles';
|
||||
import { useTheme } from '../../../../theme';
|
||||
|
||||
const ReadReceipt = React.memo(({ isReadReceiptEnabled, unread }: { isReadReceiptEnabled?: boolean; unread?: boolean }) => {
|
||||
const { theme } = useTheme();
|
||||
if (isReadReceiptEnabled && !unread && unread !== null) {
|
||||
return <CustomIcon name='check' color={themes[theme].tintColor} size={16} style={styles.rightIcons} />;
|
||||
const { colors } = useTheme();
|
||||
if (isReadReceiptEnabled) {
|
||||
return (
|
||||
<CustomIcon
|
||||
name='check'
|
||||
color={!unread && unread !== null ? colors.tintColor : colors.auxiliaryTintColor}
|
||||
size={16}
|
||||
style={styles.rightIcons}
|
||||
/>
|
||||
);
|
||||
}
|
||||
return null;
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue