Fix PR comments
This commit is contained in:
parent
78587558d8
commit
d6788b023b
3 changed files with 13 additions and 13 deletions
|
@ -16,7 +16,7 @@ limitations under the License.
|
|||
|
||||
import React from 'react';
|
||||
import { MatrixEvent, Room } from 'matrix-js-sdk/src';
|
||||
import { Thread, THREAD_EVENTS } from 'matrix-js-sdk/src/models/thread';
|
||||
import { Thread, ThreadEvents } from 'matrix-js-sdk/src/models/thread';
|
||||
|
||||
import BaseCard from "../views/right_panel/BaseCard";
|
||||
import { RightPanelPhases } from "../../stores/RightPanelStorePhases";
|
||||
|
@ -99,15 +99,15 @@ export default class ThreadView extends React.Component<IProps, IState> {
|
|||
thread = new Thread([mxEv], this.props.room, client);
|
||||
mxEv.setThread(thread);
|
||||
}
|
||||
thread.on(THREAD_EVENTS.update, this.updateThread);
|
||||
thread.once(THREAD_EVENTS.ready, this.updateThread);
|
||||
thread.on(ThreadEvents.Update, this.updateThread);
|
||||
thread.once(ThreadEvents.Ready, this.updateThread);
|
||||
this.updateThread(thread);
|
||||
};
|
||||
|
||||
private teardownThread = () => {
|
||||
if (this.state.thread) {
|
||||
this.state.thread.removeListener(THREAD_EVENTS.update, this.updateThread);
|
||||
this.state.thread.removeListener(THREAD_EVENTS.ready, this.updateThread);
|
||||
this.state.thread.removeListener(ThreadEvents.Update, this.updateThread);
|
||||
this.state.thread.removeListener(ThreadEvents.Ready, this.updateThread);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue