From 95c7f84e55a1d7e0a485981a9ba4b5ceb18fcff3 Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Wed, 5 Oct 2022 18:16:23 -0400 Subject: [PATCH] Aligns protocol/event naming --- src/plus/webviews/graph/graphWebview.ts | 8 ++++---- src/plus/webviews/graph/protocol.ts | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/plus/webviews/graph/graphWebview.ts b/src/plus/webviews/graph/graphWebview.ts index 05a9677..d9bf4d5 100644 --- a/src/plus/webviews/graph/graphWebview.ts +++ b/src/plus/webviews/graph/graphWebview.ts @@ -361,10 +361,10 @@ export class GraphWebview extends WebviewBase { onIpc(SearchOpenInViewCommandType, e, params => this.onSearchOpenInView(params)); break; case UpdateColumnCommandType.method: - onIpc(UpdateColumnCommandType, e, params => this.onColumnUpdated(params)); + onIpc(UpdateColumnCommandType, e, params => this.onColumnChanged(params)); break; case UpdateSelectedRepositoryCommandType.method: - onIpc(UpdateSelectedRepositoryCommandType, e, params => this.onRepositorySelectionChanged(params)); + onIpc(UpdateSelectedRepositoryCommandType, e, params => this.onSelectedRepositoryChanged(params)); break; case UpdateSelectionCommandType.method: onIpc(UpdateSelectionCommandType, e, this.onSelectionChanged.bind(this)); @@ -487,7 +487,7 @@ export class GraphWebview extends WebviewBase { void this.container.storage.storeWorkspace('graph:banners:dismissed', banners); } - private onColumnUpdated(e: UpdateColumnParams) { + private onColumnChanged(e: UpdateColumnParams) { this.updateColumn(e.name, e.config); } @@ -674,7 +674,7 @@ export class GraphWebview extends WebviewBase { }); } - private onRepositorySelectionChanged(e: UpdateSelectedRepositoryParams) { + private onSelectedRepositoryChanged(e: UpdateSelectedRepositoryParams) { this.repository = this.container.git.getRepository(e.path); } diff --git a/src/plus/webviews/graph/protocol.ts b/src/plus/webviews/graph/protocol.ts index 86a2385..01694ba 100644 --- a/src/plus/webviews/graph/protocol.ts +++ b/src/plus/webviews/graph/protocol.ts @@ -138,19 +138,19 @@ export interface UpdateColumnParams { name: GraphColumnName; config: GraphColumnConfig; } -export const UpdateColumnCommandType = new IpcCommandType('graph/update/column'); +export const UpdateColumnCommandType = new IpcCommandType('graph/column/update'); export interface UpdateSelectedRepositoryParams { path: string; } export const UpdateSelectedRepositoryCommandType = new IpcCommandType( - 'graph/update/repositorySelection', + 'graph/selectedRepository/update', ); export interface UpdateSelectionParams { selection: { id: string; type: GitGraphRowType }[]; } -export const UpdateSelectionCommandType = new IpcCommandType('graph/update/selection'); +export const UpdateSelectionCommandType = new IpcCommandType('graph/selection/update'); // Notifications export interface DidChangeParams {