Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Convert setupNotificationListener to an unbound function
Browse files Browse the repository at this point in the history
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 element-hq/element-web#22141
  • Loading branch information
turt2live committed May 17, 2022
1 parent 5f8aeca commit 27fa757
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/views/rooms/EventTile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 27fa757

Please sign in to comment.