Fix scroll to bottom on unread messages

This commit is contained in:
Tainan Felipe 2020-11-30 09:19:15 -03:00
parent b9fab56ca4
commit 46a5ac6eb5

View File

@ -231,8 +231,9 @@ class MessageList extends Component {
hasUnreadMessages, hasUnreadMessages,
scrollPosition, scrollPosition,
} = this.props; } = this.props;
const { userScrolledBack } = this.state;
if (hasUnreadMessages && scrollPosition !== null) { if (hasUnreadMessages && userScrolledBack) {
return ( return (
<Button <Button
aria-hidden="true" aria-hidden="true"