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:
Travis Ralston 2022-05-17 00:21:29 -06:00 committed by GitHub
parent 2bddadc14e
commit afaeaaf954
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;