You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-10 09:22:25 +03:00
Improve addEventsToTimeline performance scoping WhoIsTypingTile::setState
This commit is contained in:
@@ -87,7 +87,9 @@ export default class WhoIsTypingTile extends React.Component {
|
|||||||
const userId = event.getSender();
|
const userId = event.getSender();
|
||||||
// remove user from usersTyping
|
// remove user from usersTyping
|
||||||
const usersTyping = this.state.usersTyping.filter((m) => m.userId !== userId);
|
const usersTyping = this.state.usersTyping.filter((m) => m.userId !== userId);
|
||||||
|
if (usersTyping.length !== this.state.usersTyping.length) {
|
||||||
this.setState({usersTyping});
|
this.setState({usersTyping});
|
||||||
|
}
|
||||||
// abort timer if any
|
// abort timer if any
|
||||||
this._abortUserTimer(userId);
|
this._abortUserTimer(userId);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user