Skip to content

Commit

Permalink
Refactor injections in effects (#4137)
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikiwanekhyland authored and VitoAlbano committed Oct 8, 2024
1 parent 3122b46 commit 6f779d2
Showing 1 changed file with 27 additions and 29 deletions.
56 changes: 27 additions & 29 deletions projects/aca-content/src/lib/store/effects/node.effects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,36 +22,36 @@
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
*/

import { Actions, ofType, createEffect } from '@ngrx/effects';
import { Injectable, SecurityContext } from '@angular/core';
import { Actions, createEffect, ofType } from '@ngrx/effects';
import { inject, Injectable, SecurityContext } from '@angular/core';
import { first, map, take } from 'rxjs/operators';
import { Store } from '@ngrx/store';
import {
AppStore,
NodeActionTypes,
PurgeDeletedNodesAction,
DeleteNodesAction,
UndoDeleteNodesAction,
CopyNodesAction,
CreateFolderAction,
DeleteNodesAction,
EditFolderAction,
RestoreDeletedNodesAction,
ShareNodeAction,
ManageVersionsAction,
UnlockWriteAction,
UnshareNodesAction,
CopyNodesAction,
MoveNodesAction,
ManagePermissionsAction,
PrintFileAction,
getCurrentFolder,
ExpandInfoDrawerAction,
getAppSelection,
getCurrentFolder,
ManageAspectsAction,
NavigateRouteAction,
ExpandInfoDrawerAction,
ManagePermissionsAction,
ManageRulesAction,
ShowLoaderAction,
ManageVersionsAction,
MoveNodesAction,
NavigateRouteAction,
NavigateUrlAction,
NodeActionTypes,
PrintFileAction,
PurgeDeletedNodesAction,
RestoreDeletedNodesAction,
SetInfoDrawerStateAction,
NavigateUrlAction
ShareNodeAction,
ShowLoaderAction,
UndoDeleteNodesAction,
UnlockWriteAction,
UnshareNodesAction
} from '@alfresco/aca-shared/store';
import { ContentManagementService } from '../../services/content-management.service';
import { RenditionService } from '@alfresco/adf-content-services';
Expand All @@ -60,15 +60,13 @@ import { DomSanitizer } from '@angular/platform-browser';

@Injectable()
export class NodeEffects {
constructor(
private store: Store<AppStore>,
private actions$: Actions,
private router: Router,
private contentService: ContentManagementService,
private renditionViewer: RenditionService,
private activatedRoute: ActivatedRoute,
private sanitizer: DomSanitizer
) {}
private readonly store = inject(Store<AppStore>);
private readonly actions$ = inject(Actions);
private readonly router = inject(Router);
private readonly contentService = inject(ContentManagementService);
private readonly renditionViewer = inject(RenditionService);
private readonly activatedRoute = inject(ActivatedRoute);
private readonly sanitizer = inject(DomSanitizer);

shareNode$ = createEffect(
() =>
Expand Down

0 comments on commit 6f779d2

Please sign in to comment.