|
|
|
@ -6,7 +6,7 @@ |
|
|
|
*/ |
|
|
|
|
|
|
|
import { Injectable } from '@angular/core'; |
|
|
|
import { forkJoin, Observable, of } from 'rxjs'; |
|
|
|
import { forkJoin, Observable, of, empty } from 'rxjs'; |
|
|
|
import { catchError, switchMap, tap } from 'rxjs/operators'; |
|
|
|
|
|
|
|
import { |
|
|
|
@ -124,6 +124,14 @@ export abstract class ContentsStateBase extends State<Snapshot> { |
|
|
|
return this.loadInternal(isReload); |
|
|
|
} |
|
|
|
|
|
|
|
public loadIfNotLoaded(): Observable<any> { |
|
|
|
if (this.snapshot.isLoaded) { |
|
|
|
return empty(); |
|
|
|
} |
|
|
|
|
|
|
|
return this.loadInternal(false); |
|
|
|
} |
|
|
|
|
|
|
|
private loadInternal(isReload = false) { |
|
|
|
return this.loadInternalCore(isReload).pipe(shareSubscribed(this.dialogs)); |
|
|
|
} |
|
|
|
|