ACS-8572: Switch to using ADF document list reload (#4021)

This commit is contained in:
Denys Vuika
2024-08-12 08:37:18 -04:00
committed by GitHub
parent 73f47b7d79
commit 435ea6e358
14 changed files with 72 additions and 87 deletions

View File

@@ -26,18 +26,18 @@ import { Actions, ofType, createEffect } from '@ngrx/effects';
import { Injectable } from '@angular/core';
import { map } from 'rxjs/operators';
import { AppActionTypes, ReloadDocumentListAction, ResetSelectionAction } from '@alfresco/aca-shared/store';
import { AppHookService } from '@alfresco/aca-shared';
import { DocumentListService } from '@alfresco/adf-content-services';
@Injectable()
export class AppEffects {
constructor(private actions$: Actions, private appHookService: AppHookService) {}
constructor(private actions$: Actions, private documentListService: DocumentListService) {}
reload = createEffect(
() =>
this.actions$.pipe(
ofType<ReloadDocumentListAction>(AppActionTypes.ReloadDocumentList),
map((action) => {
this.appHookService.reload.next(action);
map(() => {
this.documentListService.reload();
})
),
{ dispatch: false }
@@ -47,8 +47,8 @@ export class AppEffects {
() =>
this.actions$.pipe(
ofType<ResetSelectionAction>(AppActionTypes.ResetSelection),
map((action) => {
this.appHookService.reset.next(action);
map(() => {
this.documentListService.resetSelection();
})
),
{ dispatch: false }