From 27fa75727484265b1fdae820817a722a14339168 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Mon, 16 May 2022 21:53:28 -0600 Subject: [PATCH] Convert `setupNotificationListener` to an unbound function 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 --- src/components/views/rooms/EventTile.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/views/rooms/EventTile.tsx b/src/components/views/rooms/EventTile.tsx index 9ccf7d44dd5..7683f67a202 100644 --- a/src/components/views/rooms/EventTile.tsx +++ b/src/components/views/rooms/EventTile.tsx @@ -401,14 +401,14 @@ export class UnwrappedEventTile extends React.Component { 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;