remove wrong logic on badge prop (#4564)
Co-authored-by: Reinaldo Neto <47038980+reinaldonetof@users.noreply.github.com>
This commit is contained in:
parent
7442f2c844
commit
2629140159
|
@ -5,7 +5,7 @@ import { CustomIcon } from '../../../CustomIcon';
|
|||
import styles from '../../styles';
|
||||
import { useTheme } from '../../../../theme';
|
||||
|
||||
const ReadReceipt = React.memo(({ isReadReceiptEnabled, unread }: { isReadReceiptEnabled?: boolean; unread: boolean }) => {
|
||||
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} />;
|
||||
|
|
|
@ -17,8 +17,8 @@ interface IRightIcons {
|
|||
type: MessageType;
|
||||
msg?: string;
|
||||
isEdited: boolean;
|
||||
isReadReceiptEnabled: boolean;
|
||||
unread: boolean;
|
||||
isReadReceiptEnabled?: boolean;
|
||||
unread?: boolean;
|
||||
hasError: boolean;
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@ const RightIcons = ({ type, msg, isEdited, hasError, isReadReceiptEnabled, unrea
|
|||
<Encrypted type={type} />
|
||||
<Edited testID={`${msg}-edited`} isEdited={isEdited} />
|
||||
<MessageError hasError={hasError} />
|
||||
<ReadReceipt isReadReceiptEnabled={isReadReceiptEnabled} unread={unread || false} />
|
||||
<ReadReceipt isReadReceiptEnabled={isReadReceiptEnabled} unread={unread} />
|
||||
</View>
|
||||
);
|
||||
|
||||
|
|
|
@ -97,8 +97,8 @@ const Message = React.memo((props: IMessage) => {
|
|||
msg={props.msg}
|
||||
isEdited={props.isEdited}
|
||||
hasError={props.hasError}
|
||||
isReadReceiptEnabled={props.isReadReceiptEnabled || false}
|
||||
unread={props.unread || false}
|
||||
isReadReceiptEnabled={props.isReadReceiptEnabled}
|
||||
unread={props.unread}
|
||||
/>
|
||||
) : null}
|
||||
</View>
|
||||
|
|
|
@ -114,8 +114,8 @@ const User = React.memo(
|
|||
type={type}
|
||||
isEdited={isEdited}
|
||||
hasError={hasError}
|
||||
isReadReceiptEnabled={props.isReadReceiptEnabled || false}
|
||||
unread={props.unread || false}
|
||||
isReadReceiptEnabled={props.isReadReceiptEnabled}
|
||||
unread={props.unread}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue