[ACA-4320] Correctly trigger linksUnshared event after unsharing a file (#2037)

* [ACA-4320] Correctly trigger linksUnshared event after unsharing a file

* [ACA-4320] Fix unit test

* [ACA-4320] Fixed unit test
This commit is contained in:
Thomas Hunter 2021-03-05 12:17:54 +01:00 committed by GitHub
parent 1c81c0c821
commit 45f89c005a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 5 deletions

View File

@ -1429,7 +1429,7 @@ describe('ContentManagementService', () => {
tick();
flush();
expect(contentManagementService.linksUnshared.next).toHaveBeenCalledWith(jasmine.any(Object));
expect(contentManagementService.linksUnshared.next).toHaveBeenCalled();
}));
});

View File

@ -245,11 +245,9 @@ export class ContentManagementService {
}
})
.afterClosed()
.subscribe((deletedSharedLink) => {
.subscribe(() => {
this.store.dispatch(new SetSelectedNodesAction([node]));
if (deletedSharedLink) {
this.linksUnshared.next(deletedSharedLink);
}
this.linksUnshared.next();
});
});
}