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
t3chguy/dedup-icons-17oct
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
1 changed files with 2 additions and 2 deletions

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;