Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

progress - remove options #92446

Merged
merged 1 commit into from Mar 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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 @@ -345,7 +345,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