mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
[DURACOM-234] Fix merge with main
This commit is contained in:
@@ -3,12 +3,9 @@ import {
|
||||
provideHttpClient,
|
||||
withInterceptorsFromDi,
|
||||
} from '@angular/common/http';
|
||||
import {
|
||||
APP_INITIALIZER,
|
||||
NgModule,
|
||||
} from '@angular/core';
|
||||
import {
|
||||
APP_ID,
|
||||
APP_INITIALIZER,
|
||||
ApplicationConfig,
|
||||
importProvidersFrom,
|
||||
makeStateKey,
|
||||
@@ -53,10 +50,10 @@ import { ClientCookieService } from '../../app/core/services/client-cookie.servi
|
||||
import { CookieService } from '../../app/core/services/cookie.service';
|
||||
import { HardRedirectService } from '../../app/core/services/hard-redirect.service';
|
||||
import { ReferrerService } from '../../app/core/services/referrer.service';
|
||||
import { BrowserXSRFService } from '../../app/core/xsrf/browser-xsrf.service';
|
||||
import { XSRFService } from '../../app/core/xsrf/xsrf.service';
|
||||
import { ClientMathService } from '../../app/core/shared/client-math.service';
|
||||
import { MathService } from '../../app/core/shared/math.service';
|
||||
import { BrowserXSRFService } from '../../app/core/xsrf/browser-xsrf.service';
|
||||
import { XSRFService } from '../../app/core/xsrf/xsrf.service';
|
||||
import { BrowserKlaroService } from '../../app/shared/cookies/browser-klaro.service';
|
||||
import { KlaroService } from '../../app/shared/cookies/klaro.service';
|
||||
import { MissingTranslationHelper } from '../../app/shared/translate/missing-translation.helper';
|
||||
|
@@ -18,6 +18,7 @@ import { Store } from '@ngrx/store';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import {
|
||||
firstValueFrom,
|
||||
lastValueFrom,
|
||||
Subscription,
|
||||
} from 'rxjs';
|
||||
import {
|
||||
@@ -124,7 +125,7 @@ export class BrowserInitService extends InitService {
|
||||
|
||||
this.initKlaro();
|
||||
|
||||
await this.authenticationReady$().toPromise();
|
||||
await lastValueFrom(this.authenticationReady$());
|
||||
|
||||
return true;
|
||||
};
|
||||
@@ -141,10 +142,12 @@ export class BrowserInitService extends InitService {
|
||||
const state = this.transferState.get<any>(InitService.NGRX_STATE, null);
|
||||
this.transferState.remove(InitService.NGRX_STATE);
|
||||
this.store.dispatch(new StoreAction(StoreActionTypes.REHYDRATE, state));
|
||||
return this.store.select(coreSelector).pipe(
|
||||
find((core: any) => isNotEmpty(core)),
|
||||
map(() => true),
|
||||
).toPromise();
|
||||
return lastValueFrom(
|
||||
this.store.select(coreSelector).pipe(
|
||||
find((core: any) => isNotEmpty(core)),
|
||||
map(() => true),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
private trackAuthTokenExpiration(): void {
|
||||
@@ -190,7 +193,7 @@ export class BrowserInitService extends InitService {
|
||||
* @private
|
||||
*/
|
||||
private closeAuthCheckSubscription() {
|
||||
firstValueFrom(this.authenticationReady$()).then(() => {
|
||||
void firstValueFrom(this.authenticationReady$()).then(() => {
|
||||
this.sub.unsubscribe();
|
||||
});
|
||||
}
|
||||
|
@@ -8,10 +8,11 @@
|
||||
import {
|
||||
Inject,
|
||||
Injectable,
|
||||
TransferState,
|
||||
} from '@angular/core';
|
||||
import { TransferState } from '@angular/platform-browser';
|
||||
import { Store } from '@ngrx/store';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { lastValueFrom } from 'rxjs';
|
||||
import { take } from 'rxjs/operators';
|
||||
|
||||
import { AppState } from '../../app/app.reducer';
|
||||
@@ -75,7 +76,7 @@ export class ServerInitService extends InitService {
|
||||
this.initRouteListeners();
|
||||
this.themeService.listenForThemeChanges(false);
|
||||
|
||||
await this.authenticationReady$().toPromise();
|
||||
await lastValueFrom(this.authenticationReady$());
|
||||
|
||||
return true;
|
||||
};
|
||||
|
Reference in New Issue
Block a user