Add live voice broadcast indicator to user menu (#9590)

This commit is contained in:
Michael Weimann 2022-11-18 08:36:20 +01:00 committed by GitHub
parent c3de8cbe6b
commit ef548a4843
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 191 additions and 4 deletions

View file

@ -31,7 +31,7 @@ interface EventMap {
* This store provides access to the current and specific Voice Broadcast recordings.
*/
export class VoiceBroadcastRecordingsStore extends TypedEventEmitter<VoiceBroadcastRecordingsStoreEvent, EventMap> {
private current: VoiceBroadcastRecording | null;
private current: VoiceBroadcastRecording | null = null;
private recordings = new Map<string, VoiceBroadcastRecording>();
public constructor() {
@ -55,6 +55,10 @@ export class VoiceBroadcastRecordingsStore extends TypedEventEmitter<VoiceBroadc
return this.current;
}
public hasCurrent(): boolean {
return this.current !== null;
}
public clearCurrent(): void {
if (!this.current) return;