Skip to content

Commit 7ea9fcd

Browse files
authored
Merge pull request #3013 from codefori/actionsFocus
2 parents 8dd1c1d + efd1246 commit 7ea9fcd

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

src/api/configuration/config/ConnectionManager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export class ConnectionManager {
7272
}
7373

7474
async sort() {
75-
const connections = await this.getAll();
75+
const connections = this.getAll();
7676
connections.sort((a, b) => a.name.localeCompare(b.name));
7777
return this.configMethod.set(`connections`, connections);
7878
}

src/ui/views/environment/environmentView.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ export function initializeEnvironmentView(context: vscode.ExtensionContext) {
2929
};
3030

3131
const localActionsWatcher = vscode.workspace.createFileSystemWatcher(`**/.vscode/actions.json`);
32-
localActionsWatcher.onDidCreate(() => environmentView.actionsNode?.forceRefresh());
33-
localActionsWatcher.onDidChange(() => environmentView.actionsNode?.forceRefresh());
34-
localActionsWatcher.onDidDelete(() => environmentView.actionsNode?.forceRefresh());
32+
localActionsWatcher.onDidCreate(() => environmentView.actionsNode?.forceRefresh());
33+
localActionsWatcher.onDidChange(() => environmentView.actionsNode?.forceRefresh());
34+
localActionsWatcher.onDidDelete(() => environmentView.actionsNode?.forceRefresh());
3535

3636
context.subscriptions.push(
3737
environmentTreeViewer,
@@ -390,8 +390,8 @@ export function initializeEnvironmentView(context: vscode.ExtensionContext) {
390390
class EnvironmentView implements vscode.TreeDataProvider<BrowserItem> {
391391
private readonly emitter = new vscode.EventEmitter<BrowserItem | BrowserItem[] | undefined | null | void>();
392392
readonly onDidChangeTreeData = this.emitter.event;
393-
actionsNode?: ActionsNode
394-
profilesNode?: ProfilesNode
393+
readonly actionsNode = new ActionsNode();
394+
readonly profilesNode = new ProfilesNode();
395395

396396
refresh(target?: BrowserItem) {
397397
this.emitter.fire(target);
@@ -410,8 +410,6 @@ class EnvironmentView implements vscode.TreeDataProvider<BrowserItem> {
410410
return item.getChildren?.();
411411
}
412412
else {
413-
this.actionsNode = new ActionsNode();
414-
this.profilesNode = new ProfilesNode();
415413
return [
416414
this.actionsNode,
417415
new CustomVariablesNode(),

0 commit comments

Comments
 (0)