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:
Richard van der Hoff 2015-12-11 11:04:12 +00:00
parent ee0f0e332a
commit 0d47495e04

View File

@ -285,9 +285,6 @@ module.exports = React.createClass({
var scrollState = this.savedScrollState; var scrollState = this.savedScrollState;
if (scrollState.atBottom) { if (scrollState.atBottom) {
this.scrollToBottom(); this.scrollToBottom();
if (this.state.numUnreadMessages !== 0) {
this.setState({numUnreadMessages: 0});
}
} else if (scrollState.lastDisplayedEvent) { } else if (scrollState.lastDisplayedEvent) {
this.scrollToEvent(scrollState.lastDisplayedEvent, this.scrollToEvent(scrollState.lastDisplayedEvent,
scrollState.pixelOffset); scrollState.pixelOffset);