Remove dead & duplicated code (#11405)

* Remove dead code

* Make dead code happier

* DRY pickle additional data calculation

* Iterate
This commit is contained in:
Michael Telatynski
2023-08-15 09:43:15 +01:00
committed by GitHub
parent 672ad98ec7
commit 27d79458da
25 changed files with 50 additions and 201 deletions

View File

@@ -69,8 +69,4 @@ export class PermalinkParts {
public get primaryEntityId(): string | null {
return this.roomIdOrAlias || this.userId;
}
public get sigil(): string {
return this.primaryEntityId?.[0] || "?";
}
}

View File

@@ -114,6 +114,7 @@ export class RoomPermalinkCreator {
}
public start(): void {
if (this.started) return;
this.load();
this.room?.currentState.on(RoomStateEvent.Update, this.onRoomStateUpdate);
this.started = true;
@@ -128,10 +129,6 @@ export class RoomPermalinkCreator {
return this._serverCandidates;
}
public isStarted(): boolean {
return this.started;
}
public forEvent(eventId: string): string {
return getPermalinkConstructor().forEvent(this.roomId, eventId, this._serverCandidates);
}