From 0d47495e04e6410f77be2ba79d629841fc047378 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Fri, 11 Dec 2015 11:04:12 +0000 Subject: [PATCH] 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. --- src/components/structures/RoomView.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index ea489b326a..872640f52e 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -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);