change message focus only on query end (#5793)

This commit is contained in:
Anthony Dresser
2019-05-31 13:23:17 -07:00
committed by GitHub
parent f231d6945f
commit dc2ff2295e

View File

@@ -223,15 +223,13 @@ export class QueryResultsView extends Disposable {
this.input.state.visibleTabs = new Set();
this.input.state.activeTab = this.resultsTab.identifier;
}));
this.runnerDisposables.push(runner.onMessage(e => {
if (e.isError) {
this._panelView.showTab(this.messagesTab.identifier);
}
}));
this.runnerDisposables.push(runner.onQueryEnd(() => {
if (!this.hasResults(runner)) {
this.hideResults();
}
if (runner.messages.find(v => v.isError)) {
this._panelView.showTab(this.messagesTab.identifier);
}
}));
if (this.input.state.visibleTabs.has(this.chartTab.identifier) && !this._panelView.contains(this.chartTab)) {