Message List: Fix flickering when sending message to an empty channel

This commit is contained in:
Alexander Zinchuk 2021-11-17 17:49:43 +03:00
parent a31aa31b6b
commit c876400014

View File

@ -275,8 +275,8 @@ const MessageList: FC<OwnProps & StateProps & DispatchProps> = ({
} }
// Loading history while sending a message can return the same message and cause ambiguity // Loading history while sending a message can return the same message and cause ambiguity
const isFirstMessageLocal = messageIds && messageIds[0] >= LOCAL_MESSAGE_ID_BASE; const isLastMessageLocal = messageIds && messageIds[messageIds.length - 1] >= LOCAL_MESSAGE_ID_BASE;
if (isFirstMessageLocal) { if (isLastMessageLocal) {
return; return;
} }