mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 05:04:57 +08:00
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
@ -401,14 +401,14 @@ export class UnwrappedEventTile extends React.Component<IProps, IState> {
|
||||
room?.on(ThreadEvent.New, this.onNewThread);
|
||||
}
|
||||
|
||||
private setupNotificationListener = (thread: Thread): void => {
|
||||
private setupNotificationListener(thread: Thread): void {
|
||||
const notifications = RoomNotificationStateStore.instance.getThreadsRoomState(thread.room);
|
||||
|
||||
this.threadState = notifications.getThreadRoomState(thread);
|
||||
|
||||
this.threadState.on(NotificationStateEvents.Update, this.onThreadStateUpdate);
|
||||
this.onThreadStateUpdate();
|
||||
};
|
||||
}
|
||||
|
||||
private onThreadStateUpdate = (): void => {
|
||||
let threadNotification = null;
|
||||
|
Loading…
Reference in New Issue
Block a user