mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-15 05:53:03 +00:00
87968: Automatic upgrade to NgRx 13
This commit is contained in:
6
src/app/core/cache/object-cache.effects.ts
vendored
6
src/app/core/cache/object-cache.effects.ts
vendored
@@ -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) {
|
||||
}
|
||||
|
Reference in New Issue
Block a user