[ADF-2393] fixed reloading on delete with infinite scrolling (#3057)

* [ADF-2393] fixed reloading on delete with infinite scrolling

* [ADF-2393] refactored after PR
This commit is contained in:
Vito
2018-03-13 17:28:25 +00:00
committed by Eugenio Romano
parent 27de866193
commit 766bb082f5
3 changed files with 11 additions and 21 deletions

View File

@@ -101,10 +101,7 @@ export class DocumentActionsService {
private prepareHandlers(actionObservable, type: string, action: string, target?: any, permission?: string): void {
actionObservable.subscribe(
(fileOperationMessage) => {
if (target && typeof target.reload === 'function') {
target.reload();
}
this.success.next(fileOperationMessage);
this.success.next(fileOperationMessage);
},
this.error.next.bind(this.error)
);
@@ -117,9 +114,6 @@ export class DocumentActionsService {
if (this.contentService.hasPermission(node.entry, permission)) {
handlerObservable = this.documentListService.deleteNode(node.entry.id);
handlerObservable.subscribe(() => {
if (target && typeof target.reload === 'function') {
target.reload();
}
this.success.next(node.entry.id);
});
return handlerObservable;