From afaeaaf954607a56cf7b8a6561b60c0a58b1018b Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 17 May 2022 00:21:29 -0600 Subject: [PATCH] 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 --- 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 9ccf7d44dd..7683f67a20 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;