Threads notifications after app startup (#7253)
This commit is contained in:
parent
b4b81a455e
commit
38e5e94ee4
10 changed files with 194 additions and 28 deletions
|
@ -72,6 +72,7 @@ export default class ThreadView extends React.Component<IProps, IState> {
|
|||
super(props);
|
||||
this.state = {};
|
||||
}
|
||||
|
||||
public componentDidMount(): void {
|
||||
this.setupThread(this.props.mxEvent);
|
||||
this.dispatcherRef = dis.register(this.onAction);
|
||||
|
@ -166,10 +167,11 @@ export default class ThreadView extends React.Component<IProps, IState> {
|
|||
};
|
||||
|
||||
private updateThread = (thread?: Thread) => {
|
||||
if (thread) {
|
||||
if (thread && this.state.thread !== thread) {
|
||||
this.setState({
|
||||
thread,
|
||||
});
|
||||
thread.emit(ThreadEvent.ViewThread);
|
||||
}
|
||||
|
||||
this.timelinePanelRef.current?.refreshTimeline();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue