From e7b91aae52c71f7df85df91cd22fd4b36fc78ab4 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 16 Feb 2022 09:26:22 +0000 Subject: [PATCH] Remove unused Thread.Ready emit signature --- src/models/event.ts | 2 +- src/models/room.ts | 1 - src/models/thread.ts | 5 ++--- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/models/event.ts b/src/models/event.ts index 9b04ae0996c..7a7a3567220 100644 --- a/src/models/event.ts +++ b/src/models/event.ts @@ -1559,7 +1559,7 @@ export class MatrixEvent extends EventEmitter { public setThread(thread: Thread): void { this.thread = thread; this.setThreadId(thread.id); - this.reEmitter.reEmit(thread, [ThreadEvent.Ready, ThreadEvent.Update]); + this.reEmitter.reEmit(thread, [ThreadEvent.Update]); } /** diff --git a/src/models/room.ts b/src/models/room.ts index b9f79ba8804..228e5264417 100644 --- a/src/models/room.ts +++ b/src/models/room.ts @@ -1413,7 +1413,6 @@ export class Room extends EventEmitter { this.threads.set(thread.id, thread); this.reEmitter.reEmit(thread, [ ThreadEvent.Update, - ThreadEvent.Ready, "Room.timeline", "Room.timelineReset", ]); diff --git a/src/models/thread.ts b/src/models/thread.ts index 9465cc6a988..4ef80128308 100644 --- a/src/models/thread.ts +++ b/src/models/thread.ts @@ -27,10 +27,9 @@ import { RoomState } from "./room-state"; export enum ThreadEvent { New = "Thread.new", - Ready = "Thread.ready", Update = "Thread.update", NewReply = "Thread.newReply", - ViewThread = "Thred.viewThread", + ViewThread = "Thread.viewThread", } interface IThreadOpts { @@ -103,7 +102,7 @@ export class Thread extends TypedEventEmitter { ?.capabilities?.[RelationType.Thread]?.enabled; } - onEcho = (event: MatrixEvent) => { + private onEcho = (event: MatrixEvent) => { if (this.timelineSet.eventIdToTimeline(event.getId())) { this.emit(ThreadEvent.Update, this); }