From 22a5f34c400f34bc9dc8ae2fb47c1ebc43b01fce Mon Sep 17 00:00:00 2001 From: Gleidson Daniel Silva Date: Tue, 18 Oct 2022 15:25:15 -0300 Subject: [PATCH] remove wrong logic on badge prop (#4564) Co-authored-by: Reinaldo Neto <47038980+reinaldonetof@users.noreply.github.com> --- .../message/Components/RightIcons/ReadReceipt.tsx | 2 +- app/containers/message/Components/RightIcons/index.tsx | 6 +++--- app/containers/message/Message.tsx | 4 ++-- app/containers/message/User.tsx | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/containers/message/Components/RightIcons/ReadReceipt.tsx b/app/containers/message/Components/RightIcons/ReadReceipt.tsx index 3a361bf7b..e7b8f87b5 100644 --- a/app/containers/message/Components/RightIcons/ReadReceipt.tsx +++ b/app/containers/message/Components/RightIcons/ReadReceipt.tsx @@ -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 ; diff --git a/app/containers/message/Components/RightIcons/index.tsx b/app/containers/message/Components/RightIcons/index.tsx index d2e1f5158..fb96aaaf5 100644 --- a/app/containers/message/Components/RightIcons/index.tsx +++ b/app/containers/message/Components/RightIcons/index.tsx @@ -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 - + ); diff --git a/app/containers/message/Message.tsx b/app/containers/message/Message.tsx index 8b6906507..d6c706cbf 100644 --- a/app/containers/message/Message.tsx +++ b/app/containers/message/Message.tsx @@ -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} diff --git a/app/containers/message/User.tsx b/app/containers/message/User.tsx index 2d908ac7c..2ecf99611 100644 --- a/app/containers/message/User.tsx +++ b/app/containers/message/User.tsx @@ -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} /> );