From abf7aeb22239134da3ce2c66e9518b09c6575125 Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Thu, 9 Dec 2021 01:47:05 -0500 Subject: [PATCH] Removes ed suffix from event names --- src/git/gitProviderService.ts | 12 ++++++------ src/trackers/documentTracker.ts | 4 ++-- src/views/nodes/repositoriesNode.ts | 4 ++-- src/views/nodes/viewNode.ts | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/git/gitProviderService.ts b/src/git/gitProviderService.ts index f022894..c1c81e4 100644 --- a/src/git/gitProviderService.ts +++ b/src/git/gitProviderService.ts @@ -87,24 +87,24 @@ const weightedDefaultBranches = new Map([ ['development', 1], ]); -export type GitProvidersChangedEvent = { +export type GitProvidersChangeEvent = { readonly added: readonly GitProvider[]; readonly removed: readonly GitProvider[]; }; -export type RepositoriesChangedEvent = { +export type RepositoriesChangeEvent = { readonly added: readonly Repository[]; readonly removed: readonly Repository[]; }; export class GitProviderService implements Disposable { - private readonly _onDidChangeProviders = new EventEmitter(); - get onDidChangeProviders(): Event { + private readonly _onDidChangeProviders = new EventEmitter(); + get onDidChangeProviders(): Event { return this._onDidChangeProviders.event; } - private _onDidChangeRepositories = new EventEmitter(); - get onDidChangeRepositories(): Event { + private _onDidChangeRepositories = new EventEmitter(); + get onDidChangeRepositories(): Event { return this._onDidChangeRepositories.event; } diff --git a/src/trackers/documentTracker.ts b/src/trackers/documentTracker.ts index 6fa7100..df1b82a 100644 --- a/src/trackers/documentTracker.ts +++ b/src/trackers/documentTracker.ts @@ -20,7 +20,7 @@ import { configuration } from '../configuration'; import { ContextKeys, DocumentSchemes, isActiveDocument, isTextEditor, setContext } from '../constants'; import { Container } from '../container'; import { RepositoryChange, RepositoryChangeComparisonMode, RepositoryChangeEvent } from '../git/git'; -import { RepositoriesChangedEvent } from '../git/gitProviderService'; +import { RepositoriesChangeEvent } from '../git/gitProviderService'; import { GitUri } from '../git/gitUri'; import { Functions, Iterables } from '../system'; import { DocumentBlameStateChangeEvent, TrackedDocument } from './trackedDocument'; @@ -144,7 +144,7 @@ export class DocumentTracker implements Disposable { } } - private onRepositoriesChanged(_e: RepositoriesChangedEvent) { + private onRepositoriesChanged(_e: RepositoriesChangeEvent) { this.reset('repository'); } diff --git a/src/views/nodes/repositoriesNode.ts b/src/views/nodes/repositoriesNode.ts index 7190a59..55ca848 100644 --- a/src/views/nodes/repositoriesNode.ts +++ b/src/views/nodes/repositoriesNode.ts @@ -1,6 +1,6 @@ 'use strict'; import { Disposable, TextEditor, TreeItem, TreeItemCollapsibleState, window } from 'vscode'; -import { RepositoriesChangedEvent } from '../../git/gitProviderService'; +import { RepositoriesChangeEvent } from '../../git/gitProviderService'; import { GitUri } from '../../git/gitUri'; import { Logger } from '../../logger'; import { debug, Functions, gate } from '../../system'; @@ -141,7 +141,7 @@ export class RepositoriesNode extends SubscribeableViewNode { } @debug() - private onRepositoriesChanged(_e: RepositoriesChangedEvent) { + private onRepositoriesChanged(_e: RepositoriesChangeEvent) { void this.triggerChange(); } } diff --git a/src/views/nodes/viewNode.ts b/src/views/nodes/viewNode.ts index b69110d..c5c6174 100644 --- a/src/views/nodes/viewNode.ts +++ b/src/views/nodes/viewNode.ts @@ -19,7 +19,7 @@ import { RepositoryChangeComparisonMode, RepositoryChangeEvent, } from '../../git/git'; -import { RepositoriesChangedEvent } from '../../git/gitProviderService'; +import { RepositoriesChangeEvent } from '../../git/gitProviderService'; import { GitUri } from '../../git/gitUri'; import { Logger } from '../../logger'; import { debug, Functions, gate, log, logName, Strings } from '../../system'; @@ -549,7 +549,7 @@ export abstract class RepositoriesSubscribeableNode< return this.view.container.git.onDidChangeRepositories(this.onRepositoriesChanged, this); } - private onRepositoriesChanged(_e: RepositoriesChangedEvent) { + private onRepositoriesChanged(_e: RepositoriesChangeEvent) { void this.triggerChange(true); } }