[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:
Reinaldo Neto 2023-02-02 00:10:27 -03:00 committed by GitHub
parent 21e4818af7
commit a927746d7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 5 deletions

File diff suppressed because one or more lines are too long

View File

@ -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;
});