Skip to content

Commit 4e1e52f

Browse files
committed
Changes ⟷ placement to be after mini diff
1 parent ec78a65 commit 4e1e52f

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/views/branchNode.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@ export class BranchNode extends ExplorerRefNode {
6060

6161
async getTreeItem(): Promise<TreeItem> {
6262
let name = this.label;
63-
let tooltip = `${this.branch.getName()}${this.branch!.current ? ' (current)' : ''}`;
63+
let tooltip = `${this.branch.getName()}${this.current ? ' (current)' : ''}`;
6464
let iconSuffix = '';
6565

6666
if (!this.branch.remote && this.branch.tracking !== undefined) {
6767
if (this.explorer.config.showTrackingBranch) {
68-
name += ` ${GlyphChars.Space}${GlyphChars.ArrowLeftRightLong}${this.branch.getTrackingStatus({ prefix: `${GlyphChars.Space} ` })}${GlyphChars.Space} ${this.branch.tracking}`;
68+
name += `${this.branch.getTrackingStatus({ prefix: `${GlyphChars.Space} ` })}${GlyphChars.Space} ${GlyphChars.ArrowLeftRightLong}${GlyphChars.Space} ${this.branch.tracking}`;
6969
}
7070
tooltip += `\n\nTracking ${GlyphChars.Dash} ${this.branch.tracking}\n${this.branch.getTrackingStatus({ empty: 'up-to-date', expand: true, separator: '\n' })}`;
7171

@@ -79,13 +79,13 @@ export class BranchNode extends ExplorerRefNode {
7979
}
8080
}
8181

82-
const item = new TreeItem(`${this.branch!.current ? `${GlyphChars.Check} ${GlyphChars.Space}` : ''}${name}`, TreeItemCollapsibleState.Collapsed);
82+
const item = new TreeItem(`${this.current ? `${GlyphChars.Check} ${GlyphChars.Space}` : ''}${name}`, TreeItemCollapsibleState.Collapsed);
8383
item.tooltip = tooltip;
8484

8585
if (this.branch.remote) {
8686
item.contextValue = ResourceType.RemoteBranch;
8787
}
88-
else if (this.branch.current) {
88+
else if (this.current) {
8989
item.contextValue = !!this.branch.tracking
9090
? ResourceType.CurrentBranchWithTracking
9191
: ResourceType.CurrentBranch;

src/views/statusNode.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export class StatusNode extends ExplorerNode {
4848
return this.children;
4949
}
5050

51-
async getTreeItem(): Promise < TreeItem > {
51+
async getTreeItem(): Promise<TreeItem> {
5252
if (this.disposable !== undefined) {
5353
this.disposable.dispose();
5454
this.disposable = undefined;
@@ -69,13 +69,13 @@ export class StatusNode extends ExplorerNode {
6969

7070
let hasChildren = false;
7171
const hasWorkingChanges = status.files.length !== 0 && this.includeWorkingTree;
72-
let label = `${status.getUpstreamStatus({ prefix: `${GlyphChars.Space} ` })}${hasWorkingChanges ? status.getDiffStatus({ prefix: `${GlyphChars.Space} `}) : ''}`;
72+
let label = `${status.getUpstreamStatus({ prefix: `${GlyphChars.Space} ` })}${hasWorkingChanges ? status.getDiffStatus({ prefix: `${GlyphChars.Space} ` }) : ''}`;
7373
let tooltip = `${status.branch} (current)`;
7474
let iconSuffix = '';
7575

7676
if (status.upstream) {
7777
if (this.explorer.config.showTrackingBranch) {
78-
label += `${GlyphChars.Space} ${status.upstream}`;
78+
label += `${GlyphChars.Space} ${GlyphChars.ArrowLeftRightLong}${GlyphChars.Space} ${status.upstream}`;
7979
}
8080
tooltip += `\n\nTracking ${GlyphChars.Dash} ${status.upstream}\n${status.getUpstreamStatus({ empty: 'up-to-date', expand: true, separator: '\n' })}`;
8181

@@ -105,7 +105,7 @@ export class StatusNode extends ExplorerNode {
105105
state = TreeItemCollapsibleState.None;
106106
}
107107

108-
const item = new TreeItem(label, state);
108+
const item = new TreeItem(`${status.branch}${label}`, state);
109109
item.id = this.id;
110110
item.contextValue = ResourceType.Status;
111111
item.tooltip = tooltip;

0 commit comments

Comments
 (0)