Extract useVoiceBroadcastRecording hook (#9406)

* Extract useVoiceBroadcastRecording hook

* Trigger CI
This commit is contained in:
Michael Weimann 2022-10-13 14:02:53 +02:00 committed by GitHub
parent 1800cb8c71
commit 7a1c47a23e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 192 additions and 185 deletions

View file

@ -50,6 +50,13 @@ export class VoiceBroadcastRecordingsStore extends TypedEventEmitter<VoiceBroadc
return this.current;
}
public clearCurrent(): void {
if (this.current === null) return;
this.current = null;
this.emit(VoiceBroadcastRecordingsStoreEvent.CurrentChanged, null);
}
public getByInfoEvent(infoEvent: MatrixEvent, client: MatrixClient): VoiceBroadcastRecording {
const infoEventId = infoEvent.getId();