Skip to content

Commit 0805a25

Browse files
committed
refactor: rename beginListenXxxxChangeEvent to observeXxxxChange
1 parent 806a89f commit 0805a25

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/extension.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ import { globalState } from './services/global-state';
55
// Import the module and reference it with the alias vscode in your code below
66
import * as vscode from 'vscode';
77
import { accountService } from './services/account.service';
8-
import { beginListenConfigurationChangeEvent, beginListenWorkspaceFolderChangeEvent } from './services/check-workspace';
8+
import {
9+
observeConfigurationChange,
10+
beginListenWorkspaceFolderChangeEvent as observeWorkspaceFolderChange,
11+
} from './services/check-workspace';
912

1013
// this method is called when your extension is activated
1114
// your extension is activated the very first time the command is executed
@@ -16,8 +19,8 @@ export function activate(context: vscode.ExtensionContext) {
1619

1720
registerCommands();
1821
registerTreeViews();
19-
beginListenConfigurationChangeEvent();
20-
beginListenWorkspaceFolderChangeEvent();
22+
observeConfigurationChange();
23+
observeWorkspaceFolderChange();
2124
}
2225

2326
// this method is called when your extension is deactivated

src/services/check-workspace.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export const isTargetWorkspace = (): boolean => {
1010
return result;
1111
};
1212

13-
export const beginListenConfigurationChangeEvent = () => {
13+
export const observeConfigurationChange = () => {
1414
globalState.extensionContext?.subscriptions.push(
1515
workspace.onDidChangeConfiguration(ev =>
1616
ev.affectsConfiguration(globalState.extensionName) ? isTargetWorkspace() : false

0 commit comments

Comments
 (0)