87968: Automatic upgrade to NgRx 13

This commit is contained in:
Yura Bondarenko
2022-03-14 18:36:57 +01:00
parent 8f7389c83a
commit 8e4f1993bf
17 changed files with 182 additions and 182 deletions

View File

@@ -1,6 +1,6 @@
import { map } from 'rxjs/operators';
import { Injectable } from '@angular/core';
import { Actions, Effect, ofType } from '@ngrx/effects';
import { Actions, createEffect, ofType } from '@ngrx/effects';
import { StoreActionTypes } from '../../store.actions';
import { ResetObjectCacheTimestampsAction } from './object-cache.actions';
@@ -16,10 +16,10 @@ export class ObjectCacheEffects {
* This assumes that the server cached everything a negligible
* time ago, and will likely need to be revisited later
*/
@Effect() fixTimestampsOnRehydrate = this.actions$
fixTimestampsOnRehydrate = createEffect(() => this.actions$
.pipe(ofType(StoreActionTypes.REHYDRATE),
map(() => new ResetObjectCacheTimestampsAction(new Date().getTime()))
);
));
constructor(private actions$: Actions) {
}