mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-09-17 14:21:14 +00:00
reload active doclist via NgRx actions (#978)
* doclist reload action and effect * deprecate folderEdited event * deprecate "favoriteToggle" event * deprecate "favoriteRemoved" event * update docs * unified reload function * deprecate "nodesRestored" event * deprecate "nodesPurged" event * test fixes * deprecate "nodesMoved" event * reduce the use of "nodesDeleted"
This commit is contained in:
@@ -73,7 +73,7 @@ export class FilesComponent extends PageComponent implements OnInit, OnDestroy {
|
||||
ngOnInit() {
|
||||
super.ngOnInit();
|
||||
|
||||
const { route, content, nodeActionsService, uploadService } = this;
|
||||
const { route, nodeActionsService, uploadService } = this;
|
||||
const { data } = route.snapshot;
|
||||
|
||||
this.title = data.title;
|
||||
@@ -101,11 +101,6 @@ export class FilesComponent extends PageComponent implements OnInit, OnDestroy {
|
||||
nodeActionsService.contentCopied.subscribe(nodes =>
|
||||
this.onContentCopied(nodes)
|
||||
),
|
||||
content.folderCreated.subscribe(() => this.documentList.reload()),
|
||||
content.folderEdited.subscribe(() => this.documentList.reload()),
|
||||
content.nodesDeleted.subscribe(() => this.documentList.reload()),
|
||||
content.nodesMoved.subscribe(() => this.documentList.reload()),
|
||||
content.nodesRestored.subscribe(() => this.documentList.reload()),
|
||||
uploadService.fileUploadComplete
|
||||
.pipe(debounceTime(300))
|
||||
.subscribe(file => this.onFileUploadedEvent(file)),
|
||||
@@ -178,7 +173,7 @@ export class FilesComponent extends PageComponent implements OnInit, OnDestroy {
|
||||
|
||||
// check root and child nodes
|
||||
if (node && node.entry && node.entry.parentId === this.getParentNodeId()) {
|
||||
this.documentList.reload();
|
||||
this.reload();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -215,7 +210,7 @@ export class FilesComponent extends PageComponent implements OnInit, OnDestroy {
|
||||
if (alreadyDisplayedParentFolder) {
|
||||
return;
|
||||
}
|
||||
this.documentList.reload();
|
||||
this.reload();
|
||||
}
|
||||
|
||||
onContentCopied(nodes: MinimalNodeEntity[]) {
|
||||
@@ -225,7 +220,7 @@ export class FilesComponent extends PageComponent implements OnInit, OnDestroy {
|
||||
);
|
||||
});
|
||||
if (newNode) {
|
||||
this.documentList.reload();
|
||||
this.reload();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user