add a key to all messages printed in SessionMessagesList

pull/1381/head
Audric Ackermann 5 years ago
parent c9e81454fb
commit 935f00934b
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -168,6 +168,7 @@ export class SessionConversationMessagesList extends React.Component<
<SessionLastSeenIndicator <SessionLastSeenIndicator
count={findFirstUnreadIndex} // count is used for the 118n of the string count={findFirstUnreadIndex} // count is used for the 118n of the string
show={showUnreadIndicator} show={showUnreadIndicator}
key={`unread-indicator-${message.id}`}
/> />
); );
@ -176,7 +177,10 @@ export class SessionConversationMessagesList extends React.Component<
if (groupNotificationProps) { if (groupNotificationProps) {
return ( return (
<> <>
<GroupNotification {...groupNotificationProps} /> <GroupNotification
{...groupNotificationProps}
key={message.id}
/>
{unreadIndicator} {unreadIndicator}
</> </>
); );
@ -185,7 +189,10 @@ export class SessionConversationMessagesList extends React.Component<
if (propsForGroupInvitation) { if (propsForGroupInvitation) {
return ( return (
<> <>
<GroupInvitation {...propsForGroupInvitation} /> <GroupInvitation
{...propsForGroupInvitation}
key={message.id}
/>
{unreadIndicator} {unreadIndicator}
</> </>
); );
@ -194,7 +201,10 @@ export class SessionConversationMessagesList extends React.Component<
if (verificationSessionProps) { if (verificationSessionProps) {
return ( return (
<> <>
<VerificationNotification {...verificationSessionProps} /> <VerificationNotification
{...verificationSessionProps}
key={message.id}
/>
{unreadIndicator} {unreadIndicator}
</> </>
); );
@ -203,7 +213,10 @@ export class SessionConversationMessagesList extends React.Component<
if (resetSessionProps) { if (resetSessionProps) {
return ( return (
<> <>
<ResetSessionNotification {...resetSessionProps} /> <ResetSessionNotification
{...resetSessionProps}
key={message.id}
/>
{unreadIndicator} {unreadIndicator}
</> </>
); );
@ -212,7 +225,7 @@ export class SessionConversationMessagesList extends React.Component<
if (timerProps) { if (timerProps) {
return ( return (
<> <>
<TimerNotification {...timerProps} /> <TimerNotification {...timerProps} key={message.id} />
{unreadIndicator} {unreadIndicator}
</> </>
); );
@ -272,8 +285,7 @@ export class SessionConversationMessagesList extends React.Component<
void this.scrollToQuoteMessage(options); void this.scrollToQuoteMessage(options);
}; };
} }
return <Message {...messageProps} key={messageProps.id} />;
return <Message {...messageProps} />;
} }
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Loading…
Cancel
Save