Skip to content

Commit

Permalink
progress - remove options
Browse files Browse the repository at this point in the history
  • Loading branch information
bpasero authored and eamodio committed Mar 16, 2020
1 parent 7fcc44c commit 379e0e3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/vs/workbench/browser/parts/compositePart.ts
Expand Up @@ -169,7 +169,7 @@ export abstract class CompositePart<T extends Composite> extends Part {
// Instantiate composite from registry otherwise
const compositeDescriptor = this.registry.getComposite(id);
if (compositeDescriptor) {
const compositeProgressIndicator = this.instantiationService.createInstance(CompositeProgressIndicator, assertIsDefined(this.progressBar), compositeDescriptor.id, !!isActive, undefined);
const compositeProgressIndicator = this.instantiationService.createInstance(CompositeProgressIndicator, assertIsDefined(this.progressBar), compositeDescriptor.id, !!isActive);
const compositeInstantiationService = this.instantiationService.createChild(new ServiceCollection(
[IEditorProgressService, compositeProgressIndicator] // provide the editor progress service for any editors instantiated within the composite
));
Expand Down
2 changes: 1 addition & 1 deletion src/vs/workbench/browser/parts/views/viewPaneContainer.ts
Expand Up @@ -343,7 +343,7 @@ export abstract class ViewPane extends Pane implements IView {
}

if (this.progressIndicator === undefined) {
this.progressIndicator = this.instantiationService.createInstance(CompositeProgressIndicator, assertIsDefined(this.progressBar), this.id, this.isVisible(), { exclusiveProgressBar: true });
this.progressIndicator = this.instantiationService.createInstance(CompositeProgressIndicator, assertIsDefined(this.progressBar), this.id, this.isVisible());
}
return this.progressIndicator;
}
Expand Down
Expand Up @@ -198,7 +198,6 @@ export class CompositeProgressIndicator extends CompositeScope implements IProgr
progressbar: ProgressBar,
scopeId: string,
isActive: boolean,
private readonly options: { exclusiveProgressBar?: boolean } | undefined,
@IViewletService viewletService: IViewletService,
@IPanelService panelService: IPanelService,
@IViewsService viewsService: IViewsService
Expand All @@ -212,9 +211,7 @@ export class CompositeProgressIndicator extends CompositeScope implements IProgr
onScopeDeactivated(): void {
this.isActive = false;

if (this.options?.exclusiveProgressBar) {
this.progressbar.stop().hide();
}
this.progressbar.stop().hide();
}

onScopeActivated(): void {
Expand Down Expand Up @@ -314,7 +311,7 @@ export class CompositeProgressIndicator extends CompositeScope implements IProgr
done: () => {
this.progressState = ProgressIndicatorState.Done;

if (this.isActive || this.options?.exclusiveProgressBar) {
if (this.isActive) {
this.progressbar.stop().hide();
}
}
Expand Down Expand Up @@ -345,7 +342,7 @@ export class CompositeProgressIndicator extends CompositeScope implements IProgr
// The while promise is either null or equal the promise we last hooked on
this.progressState = ProgressIndicatorState.None;

if (this.isActive || this.options?.exclusiveProgressBar) {
if (this.isActive) {
this.progressbar.stop().hide();
}
}
Expand Down
Expand Up @@ -129,7 +129,7 @@ suite('Progress Indicator', () => {
let viewletService = new TestViewletService();
let panelService = new TestPanelService();
let viewsService = new TestViewsService();
let service = new CompositeProgressIndicator((<any>testProgressBar), 'test.scopeId', true, undefined, viewletService, panelService, viewsService);
let service = new CompositeProgressIndicator((<any>testProgressBar), 'test.scopeId', true, viewletService, panelService, viewsService);

// Active: Show (Infinite)
let fn = service.show(true);
Expand Down

0 comments on commit 379e0e3

Please sign in to comment.