Fixed import of the clos into the operator
This commit is contained in:
parent
fab51091b1
commit
4a96aa31c1
@ -2,10 +2,9 @@ import { Injectable } from '@angular/core';
|
||||
|
||||
import { environment } from 'environments/environment';
|
||||
import { BehaviorSubject, Observable, Subscription } from 'rxjs';
|
||||
import { auditTime, filter, map } from 'rxjs/operators';
|
||||
import { auditTime, filter } from 'rxjs/operators';
|
||||
|
||||
import { Group } from 'app/shared/models/users/group';
|
||||
import { CurrentListOfSpeakersService } from 'app/site/projector/services/current-list-of-speakers.service';
|
||||
import { ViewUser } from 'app/site/users/models/view-user';
|
||||
import { CollectionStringMapperService } from './collection-string-mapper.service';
|
||||
import { DataStoreService } from './data-store.service';
|
||||
@ -210,8 +209,7 @@ export class OperatorService implements OnAfterAppsLoaded {
|
||||
private offlineService: OfflineService,
|
||||
private collectionStringMapper: CollectionStringMapperService,
|
||||
private storageService: StorageService,
|
||||
private OSStatus: OpenSlidesStatusService,
|
||||
private closService: CurrentListOfSpeakersService
|
||||
private OSStatus: OpenSlidesStatusService
|
||||
) {
|
||||
this.DS.getChangeObservable(User).subscribe(newModel => {
|
||||
if (this._user && this._user.id === newModel.id) {
|
||||
@ -462,16 +460,6 @@ export class OperatorService implements OnAfterAppsLoaded {
|
||||
await this.http.post(environment.urlPrefix + '/users/setpresence/', isPresent);
|
||||
}
|
||||
|
||||
public isOnCurrentListOfSpeakersObservable(): Observable<boolean> {
|
||||
return this.closService.currentListOfSpeakersObservable.pipe(
|
||||
map(los => {
|
||||
if (los) {
|
||||
return los.isUserOnList(this.user.id);
|
||||
}
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a default WhoAmI response
|
||||
*/
|
||||
|
@ -4,7 +4,7 @@ import { Title } from '@angular/platform-browser';
|
||||
|
||||
import { StorageMap } from '@ngx-pwa/local-storage';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { distinctUntilChanged } from 'rxjs/operators';
|
||||
import { distinctUntilChanged, map } from 'rxjs/operators';
|
||||
|
||||
import { ConstantsService } from 'app/core/core-services/constants.service';
|
||||
import { OperatorService } from 'app/core/core-services/operator.service';
|
||||
@ -12,6 +12,7 @@ import { Deferred } from 'app/core/promises/deferred';
|
||||
import { UserRepositoryService } from 'app/core/repositories/users/user-repository.service';
|
||||
import { ConfigService } from 'app/core/ui-services/config.service';
|
||||
import { BaseViewComponent } from 'app/site/base/base-view';
|
||||
import { CurrentListOfSpeakersService } from 'app/site/projector/services/current-list-of-speakers.service';
|
||||
|
||||
declare var JitsiMeetExternalAPI: any;
|
||||
|
||||
@ -166,7 +167,8 @@ export class JitsiComponent extends BaseViewComponent implements OnInit, OnDestr
|
||||
private storageMap: StorageMap,
|
||||
private userRepo: UserRepositoryService,
|
||||
private constantsService: ConstantsService,
|
||||
private configService: ConfigService
|
||||
private configService: ConfigService,
|
||||
private closService: CurrentListOfSpeakersService
|
||||
) {
|
||||
super(titleService, translate, snackBar);
|
||||
}
|
||||
@ -273,10 +275,12 @@ export class JitsiComponent extends BaseViewComponent implements OnInit, OnDestr
|
||||
this.showJitsiWindow = true;
|
||||
}
|
||||
}),
|
||||
// check if the user is on the clos, remove from room if not permitted
|
||||
this.operator
|
||||
.isOnCurrentListOfSpeakersObservable()
|
||||
.pipe(distinctUntilChanged())
|
||||
// check if the operator is on the clos, remove from room if not permitted
|
||||
this.closService.currentListOfSpeakersObservable
|
||||
.pipe(
|
||||
map(los => (los ? los.isUserOnList(this.operator.user.id) : false)),
|
||||
distinctUntilChanged()
|
||||
)
|
||||
.subscribe(isOnList => {
|
||||
this.isOnCurrentLos = isOnList;
|
||||
console.log('this.isOnCurrentLos: ', this.isOnCurrentLos);
|
||||
|
Loading…
Reference in New Issue
Block a user