Skip to content

Commit 610ba2a

Browse files
author
Marc Udoff
committed
isVisible->isEnabled
1 parent b78137c commit 610ba2a

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/gitMenuCommands.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export function addCommands(
6868
main.dispose();
6969
}
7070
},
71-
isVisible: () => model.pathRepository !== null
71+
isEnabled: () => model.pathRepository !== null
7272
});
7373

7474
/** Add open/go to git interface command */
@@ -101,7 +101,7 @@ export function addCommands(
101101
model.pathRepository = currentPath;
102102
}
103103
},
104-
isVisible: () => model.pathRepository === null
104+
isEnabled: () => model.pathRepository === null
105105
});
106106

107107
/** Open URL externally */
@@ -135,7 +135,7 @@ export function addCommands(
135135
commands.addCommand(CommandIDs.gitAddRemote, {
136136
label: 'Add remote repository',
137137
caption: 'Add a Git remote repository',
138-
isVisible: () => model.pathRepository !== null,
138+
isEnabled: () => model.pathRepository !== null,
139139
execute: async args => {
140140
if (model.pathRepository === null) {
141141
console.warn('Not in a Git repository. Unable to add a remote.');
@@ -174,8 +174,7 @@ export function addCommands(
174174
execute: async () => {
175175
await doGitClone(model, fileBrowser.model.path);
176176
fileBrowser.model.refresh();
177-
},
178-
isVisible: () => model.pathRepository === null
177+
}
179178
});
180179

181180
/**
@@ -224,7 +223,7 @@ export function addCommands(
224223
commands.addCommand(CommandIDs.gitPush, {
225224
label: 'Push to Remote',
226225
caption: 'Push code to remote repository',
227-
isVisible: () => model.pathRepository !== null,
226+
isEnabled: () => model.pathRepository !== null,
228227
execute: async () => {
229228
await showGitOperationDialog(model, Operation.Push).catch(reason => {
230229
console.error(
@@ -238,7 +237,7 @@ export function addCommands(
238237
commands.addCommand(CommandIDs.gitPull, {
239238
label: 'Pull from Remote',
240239
caption: 'Pull latest code from remote repository',
241-
isVisible: () => model.pathRepository !== null,
240+
isEnabled: () => model.pathRepository !== null,
242241
execute: async () => {
243242
await showGitOperationDialog(model, Operation.Pull).catch(reason => {
244243
console.error(

0 commit comments

Comments
 (0)