[ACA-2948] Add API to fetch the bpm properties (#5610)

* Add the api to fetch the bpm properties

* remove useless map

* Use latest api

* Use the BehaviorSubject

* filter the status true
This commit is contained in:
Maurizio Vitale
2020-04-16 17:23:00 +01:00
committed by GitHub
parent 55a5cc073b
commit e56331fecb
7 changed files with 112 additions and 41 deletions

View File

@@ -21,7 +21,7 @@ import { Observable, BehaviorSubject } from 'rxjs';
import { AppConfigService, AppConfigValues } from '../app-config/app-config.service';
import { LanguageItem } from '../language-menu/language.interface';
import { StorageService } from './storage.service';
import { distinctUntilChanged, map } from 'rxjs/operators';
import { distinctUntilChanged, map, filter } from 'rxjs/operators';
import { AlfrescoApiService } from './alfresco-api.service';
export enum UserPreferenceValues {
@@ -51,7 +51,7 @@ export class UserPreferencesService {
private appConfig: AppConfigService,
private storage: StorageService,
private alfrescoApiService: AlfrescoApiService) {
this.alfrescoApiService.alfrescoApiInitialized.subscribe(this.initUserPreferenceStatus.bind(this));
this.alfrescoApiService.alfrescoApiInitialized.pipe(filter(status => status)).subscribe(this.initUserPreferenceStatus.bind(this));
this.onChangeSubject = new BehaviorSubject(this.userPreferenceStatus);
this.onChange = this.onChangeSubject.asObservable();
}