diff --git a/src/app/components/toolbar/toggle-join-library/toggle-join-library.component.ts b/src/app/components/toolbar/toggle-join-library/toggle-join-library.component.ts index 2210b096b..a9283a430 100644 --- a/src/app/components/toolbar/toggle-join-library/toggle-join-library.component.ts +++ b/src/app/components/toolbar/toggle-join-library/toggle-join-library.component.ts @@ -34,6 +34,7 @@ import { SnackbarErrorAction, SnackbarInfoAction } from '../../../store/actions/snackbar.actions'; +import { SetSelectedNodesAction } from '../../../store/actions/node.actions'; @Component({ selector: 'app-toggle-join-library', @@ -98,6 +99,13 @@ export class ToggleJoinLibraryComponent { if (event.shouldReload) { this.content.libraryJoined.next(); } else { + if (event.updatedEntry) { + this.store.dispatch( + new SetSelectedNodesAction([ + { entry: event.updatedEntry, isLibrary: true } + ]) + ); + } this.content.joinLibraryToggle.next(); } } diff --git a/src/app/directives/library-membership.directive.ts b/src/app/directives/library-membership.directive.ts index 1d2ae0957..8f9c5710c 100644 --- a/src/app/directives/library-membership.directive.ts +++ b/src/app/directives/library-membership.directive.ts @@ -84,6 +84,7 @@ export class LibraryMembershipDirective implements OnChanges { this.targetSite.joinRequested = false; this.isJoinRequested.next(false); const info = { + updatedEntry: this.targetSite, shouldReload: false, i18nKey: 'APP.MESSAGES.INFO.JOIN_CANCELED' }; @@ -117,6 +118,7 @@ export class LibraryMembershipDirective implements OnChanges { this.toggle.emit(info); } else { const info = { + updatedEntry: this.targetSite, shouldReload: false, i18nKey: 'APP.MESSAGES.INFO.JOIN_REQUESTED' };