Improve typing around event emitter handlers (#7816)
This commit is contained in:
parent
213b32bf14
commit
7fa01ffb06
79 changed files with 548 additions and 471 deletions
|
@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue