mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-17 05:55:00 +08:00
RoomView: Remove another redundant unreadMessageCount reset
There's never any need to reset the unreadMessageCount in ComponentDidUpdate, as an update can never cause there to be *fewer* unread messages. Instead we rely on the reset in onMessageListScroll.
This commit is contained in:
parent
ee0f0e332a
commit
0d47495e04
@ -285,9 +285,6 @@ module.exports = React.createClass({
|
||||
var scrollState = this.savedScrollState;
|
||||
if (scrollState.atBottom) {
|
||||
this.scrollToBottom();
|
||||
if (this.state.numUnreadMessages !== 0) {
|
||||
this.setState({numUnreadMessages: 0});
|
||||
}
|
||||
} else if (scrollState.lastDisplayedEvent) {
|
||||
this.scrollToEvent(scrollState.lastDisplayedEvent,
|
||||
scrollState.pixelOffset);
|
||||
|
Loading…
Reference in New Issue
Block a user