remove unnecessary listeners for built-in views

This commit is contained in:
SteVen Batten 2020-02-13 08:14:41 -08:00
parent 97eb6186e7
commit c58e437830
6 changed files with 5 additions and 34 deletions

View file

@ -153,12 +153,6 @@ export class BreakpointsView extends ViewPane {
this.onBreakpointsChange();
}
}));
this._register(this.viewDescriptorService.onDidChangeLocation(({ views, from, to }) => {
if (views.some(v => v.id === this.id)) {
this.list.updateOptions({ overrideStyles: { listBackground: this.getBackgroundColor() } });
}
}));
}
public focus(): void {

View file

@ -298,12 +298,6 @@ export class CallStackView extends ViewPane {
this.parentSessionToExpand.add(s.parentSession);
}
}));
this._register(this.viewDescriptorService.onDidChangeLocation(({ views, from, to }) => {
if (views.some(v => v.id === this.id)) {
this.tree.updateOptions({ overrideStyles: { listBackground: this.getBackgroundColor() } });
}
}));
}
layoutBody(height: number, width: number): void {

View file

@ -573,12 +573,6 @@ export class LoadedScriptsView extends ViewPane {
}
}));
this._register(this.viewDescriptorService.onDidChangeLocation(({ views, from, to }) => {
if (views.some(v => v.id === this.id)) {
this.tree.updateOptions({ overrideStyles: { listBackground: this.getBackgroundColor() } });
}
}));
// feature: expand all nodes when filtering (not when finding)
let viewState: IViewState | undefined;
this._register(this.tree.onDidChangeTypeFilterPattern(pattern => {

View file

@ -143,11 +143,6 @@ export class VariablesView extends ViewPane {
this.tree.rerender(e);
}
}));
this._register(this.viewDescriptorService.onDidChangeLocation(({ views, from, to }) => {
if (views.some(v => v.id === this.id)) {
this.tree.updateOptions({ overrideStyles: { listBackground: this.getBackgroundColor() } });
}
}));
}
getActions(): IAction[] {

View file

@ -138,11 +138,11 @@ export class WatchExpressionsView extends ViewPane {
this.tree.rerender(e);
}
}));
this._register(this.viewDescriptorService.onDidChangeLocation(({ views, from, to }) => {
if (views.some(v => v.id === this.id)) {
this.tree.updateOptions({ overrideStyles: { listBackground: this.getBackgroundColor() } });
}
}));
// this._register(this.viewDescriptorService.onDidChangeLocation(({ views, from, to }) => {
// if (views.some(v => v.id === this.id)) {
// this.tree.updateOptions({ overrideStyles: { listBackground: this.getBackgroundColor() } });
// }
// }));
}
layoutBody(height: number, width: number): void {

View file

@ -302,12 +302,6 @@ export class OpenEditorsView extends ViewPane {
this.listRefreshScheduler.schedule(0);
}
}));
this._register(this.viewDescriptorService.onDidChangeLocation(({ views }) => {
if (views.some(v => v.id === this.id)) {
this.list.updateOptions({ overrideStyles: { listBackground: this.getBackgroundColor() } });
}
}));
}
getActions(): IAction[] {