You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-30 02:21:17 +03: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:
@ -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);
|
||||||
|
Reference in New Issue
Block a user