Browse Source

Removes ed suffix from event names

main
Eric Amodio 3 years ago
parent
commit
abf7aeb222
4 changed files with 12 additions and 12 deletions
  1. +6
    -6
      src/git/gitProviderService.ts
  2. +2
    -2
      src/trackers/documentTracker.ts
  3. +2
    -2
      src/views/nodes/repositoriesNode.ts
  4. +2
    -2
      src/views/nodes/viewNode.ts

+ 6
- 6
src/git/gitProviderService.ts View File

@ -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<GitProvidersChangedEvent>();
get onDidChangeProviders(): Event<GitProvidersChangedEvent> {
private readonly _onDidChangeProviders = new EventEmitter<GitProvidersChangeEvent>();
get onDidChangeProviders(): Event<GitProvidersChangeEvent> {
return this._onDidChangeProviders.event;
}
private _onDidChangeRepositories = new EventEmitter<RepositoriesChangedEvent>();
get onDidChangeRepositories(): Event<RepositoriesChangedEvent> {
private _onDidChangeRepositories = new EventEmitter<RepositoriesChangeEvent>();
get onDidChangeRepositories(): Event<RepositoriesChangeEvent> {
return this._onDidChangeRepositories.event;
}

+ 2
- 2
src/trackers/documentTracker.ts View File

@ -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');
}

+ 2
- 2
src/views/nodes/repositoriesNode.ts View File

@ -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();
}
}

+ 2
- 2
src/views/nodes/viewNode.ts View File

@ -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);
}
}

Loading…
Cancel
Save