Refactor 4 with bugfixes
This commit is contained in:
@@ -5,6 +5,7 @@ import {
|
||||
signal,
|
||||
effect
|
||||
} from '@angular/core';
|
||||
import { take } from 'rxjs';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import { WebRTCService } from './webrtc.service';
|
||||
import { Store } from '@ngrx/store';
|
||||
@@ -983,12 +984,10 @@ export class AttachmentService {
|
||||
/** Resolve the display name of the current room via the NgRx store. */
|
||||
private resolveCurrentRoomName(): Promise<string> {
|
||||
return new Promise<string>((resolve) => {
|
||||
const subscription = this.ngrxStore
|
||||
this.ngrxStore
|
||||
.select(selectCurrentRoomName)
|
||||
.subscribe((name) => {
|
||||
resolve(name || '');
|
||||
subscription.unsubscribe();
|
||||
});
|
||||
.pipe(take(1))
|
||||
.subscribe((name) => resolve(name || ''));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user