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

SCM - Remove onDidChange event #230100

Merged
merged 1 commit into from
Sep 30, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/vs/workbench/api/browser/mainThreadSCM.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,6 @@ class MainThreadSCMProvider implements ISCMProvider, QuickDiffProvider {
private readonly _actionButton = observableValue<ISCMActionButtonDescriptor | undefined>(this, undefined);
get actionButton(): IObservable<ISCMActionButtonDescriptor | undefined> { return this._actionButton; }

private readonly _onDidChange = new Emitter<void>();
readonly onDidChange: Event<void> = this._onDidChange.event;

private _quickDiff: IDisposable | undefined;
public readonly isSCM: boolean = true;

Expand Down Expand Up @@ -319,7 +316,6 @@ class MainThreadSCMProvider implements ISCMProvider, QuickDiffProvider {

$updateSourceControl(features: SCMProviderFeatures): void {
this.features = { ...this.features, ...features };
this._onDidChange.fire();

if (typeof features.commitTemplate !== 'undefined') {
this._commitTemplate.set(features.commitTemplate, undefined);
Expand Down
3 changes: 1 addition & 2 deletions src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1289,8 +1289,7 @@ export class DirtyDiffModel extends Disposable {
this.repositoryDisposables.add(disposables);
disposables.add(toDisposable(() => this.repositoryDisposables.delete(disposables)));

const onDidChange = Event.any(repository.provider.onDidChange, repository.provider.onDidChangeResources);
disposables.add(onDidChange(this.triggerDiff, this));
disposables.add(repository.provider.onDidChangeResources(this.triggerDiff, this));

const onDidRemoveThis = Event.filter(this.scmService.onDidRemoveRepository, r => r === repository);
disposables.add(onDidRemoveThis(() => dispose(disposables), null));
Expand Down
1 change: 0 additions & 1 deletion src/vs/workbench/contrib/scm/common/scm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ export interface ISCMProvider extends IDisposable {
readonly acceptInputCommand?: Command;
readonly actionButton: IObservable<ISCMActionButtonDescriptor | undefined>;
readonly statusBarCommands: IObservable<readonly Command[] | undefined>;
readonly onDidChange: Event<void>;

getOriginalResource(uri: URI): Promise<URI | null>;
}
Expand Down
Loading