Convert setupNotificationListener
to an unbound function (#8618)
This isn't called by an event handler directly, so shouldn't need to be bound. Equally, this shouldn't cause any problems. This is a long-shot attempt at completing https://github.com/vector-im/element-web/issues/22141
This commit is contained in:
parent
2bddadc14e
commit
afaeaaf954
1 changed files with 2 additions and 2 deletions
|
@ -401,14 +401,14 @@ export class UnwrappedEventTile extends React.Component<IProps, IState> {
|
||||||
room?.on(ThreadEvent.New, this.onNewThread);
|
room?.on(ThreadEvent.New, this.onNewThread);
|
||||||
}
|
}
|
||||||
|
|
||||||
private setupNotificationListener = (thread: Thread): void => {
|
private setupNotificationListener(thread: Thread): void {
|
||||||
const notifications = RoomNotificationStateStore.instance.getThreadsRoomState(thread.room);
|
const notifications = RoomNotificationStateStore.instance.getThreadsRoomState(thread.room);
|
||||||
|
|
||||||
this.threadState = notifications.getThreadRoomState(thread);
|
this.threadState = notifications.getThreadRoomState(thread);
|
||||||
|
|
||||||
this.threadState.on(NotificationStateEvents.Update, this.onThreadStateUpdate);
|
this.threadState.on(NotificationStateEvents.Update, this.onThreadStateUpdate);
|
||||||
this.onThreadStateUpdate();
|
this.onThreadStateUpdate();
|
||||||
};
|
}
|
||||||
|
|
||||||
private onThreadStateUpdate = (): void => {
|
private onThreadStateUpdate = (): void => {
|
||||||
let threadNotification = null;
|
let threadNotification = null;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue