You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-12-05 15:22:09 +03:00
Improve typing around event emitter handlers (#7816)
This commit is contained in:
committed by
GitHub
parent
213b32bf14
commit
7fa01ffb06
@@ -153,14 +153,12 @@ export default class ThreadView extends React.Component<IProps, IState> {
|
||||
thread = this.props.room.createThread(mxEv);
|
||||
}
|
||||
thread.on(ThreadEvent.Update, this.updateLastThreadReply);
|
||||
thread.once(ThreadEvent.Ready, this.updateThread);
|
||||
this.updateThread(thread);
|
||||
};
|
||||
|
||||
private teardownThread = () => {
|
||||
if (this.state.thread) {
|
||||
this.state.thread.removeListener(ThreadEvent.Update, this.updateLastThreadReply);
|
||||
this.state.thread.removeListener(ThreadEvent.Ready, this.updateThread);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user