diff --git a/app/views/ReadReceiptView/index.js b/app/views/ReadReceiptView/index.js index 9ec188d0..9cb916ed 100644 --- a/app/views/ReadReceiptView/index.js +++ b/app/views/ReadReceiptView/index.js @@ -100,6 +100,9 @@ class ReadReceiptView extends React.Component { Message_TimeFormat, user: { id: userId, token }, baseUrl, theme } = this.props; const time = moment(item.ts).format(Message_TimeFormat); + if (!item?.user?.username) { + return null; + } return ( - {item.user.name} + {item?.user?.name} {time} @@ -142,25 +145,23 @@ class ReadReceiptView extends React.Component { return ( - - {loading - ? - : ( - item._id} - /> - )} - + {loading + ? + : ( + item._id} + /> + )} ); } diff --git a/app/views/ReadReceiptView/styles.js b/app/views/ReadReceiptView/styles.js index c9375429..828e814c 100644 --- a/app/views/ReadReceiptView/styles.js +++ b/app/views/ReadReceiptView/styles.js @@ -29,7 +29,6 @@ export default StyleSheet.create({ padding: 10 }, list: { - ...sharedStyles.separatorVertical, - marginVertical: 10 + ...sharedStyles.separatorVertical } });