Skip to content

Commit

Permalink
Send introspection request if new window has URL.
Browse files Browse the repository at this point in the history
  • Loading branch information
imolorhe committed Mar 16, 2019
1 parent 4fe9fc2 commit 8eccf22
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/app/containers/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export class AppComponent {
});

if (!this.windowIds.length) {
this.windowService.newWindow().subscribe();
this.newWindow();
}
}

Expand Down Expand Up @@ -178,8 +178,12 @@ export class AppComponent {
}

newWindow() {
this.windowService.newWindow().pipe(first()).subscribe(({ windowId }) => {
this.windowService.newWindow().pipe(first()).subscribe(({ url, windowId }) => {
this.store.dispatch(new windowsMetaActions.SetActiveWindowIdAction({ windowId }));

if (url) {
this.store.dispatch(new queryActions.SendIntrospectionQueryRequestAction(windowId));
}
});
}

Expand Down

0 comments on commit 8eccf22

Please sign in to comment.