Removes branches remote commands if no remotes

Removes branch remote commands if not tracked
This commit is contained in:
Eric Amodio
2017-09-11 23:41:47 -04:00
parent f911447c5e
commit e20ec552b7
3 changed files with 9 additions and 5 deletions

View File

@@ -27,7 +27,7 @@ export class BranchHistoryNode extends ExplorerNode {
name += ` ${GlyphChars.Space}${GlyphChars.ArrowLeftRight}${GlyphChars.Space} ${this.branch.tracking}`;
}
const item = new TreeItem(`${this.branch!.current ? `${GlyphChars.Check} ${GlyphChars.Space}` : ''}${name}`, TreeItemCollapsibleState.Collapsed);
item.contextValue = this.resourceType;
item.contextValue = this.branch.tracking ? `${this.resourceType}:remote` : this.resourceType;
item.iconPath = {
dark: this.context.asAbsolutePath('images/dark/icon-branch.svg'),