Browse Source

Changes node order on repositories view

Adds node for unpublished state
main
Eric Amodio 4 years ago
parent
commit
7846fb0b81
1 changed files with 13 additions and 8 deletions
  1. +13
    -8
      src/views/nodes/repositoryNode.ts

+ 13
- 8
src/views/nodes/repositoryNode.ts View File

@ -71,14 +71,21 @@ export class RepositoryNode extends SubscribeableViewNode {
status.state.behind,
status.detached,
);
children.push(new BranchNode(this.uri, this.view, this, branch, true));
if (status.state.behind) {
children.push(new BranchTrackingStatusNode(this.view, this, branch, status, 'behind', true));
if (this.view.config.showBranchComparison !== false) {
children.push(new CompareBranchNode(this.uri, this.view, this, branch ));
}
if (status.state.ahead) {
children.push(new BranchTrackingStatusNode(this.view, this, branch, status, 'ahead', true));
if (status.upstream) {
if (status.state.behind) {
children.push(new BranchTrackingStatusNode(this.view, this, branch, status, 'behind', true));
}
if (status.state.ahead) {
children.push(new BranchTrackingStatusNode(this.view, this, branch, status, 'ahead', true));
}
} else {
children.push(new BranchTrackingStatusNode(this.view, this, branch, status, 'none', true));
}
if (status.state.ahead || (status.files.length !== 0 && this.includeWorkingTree)) {
@ -86,9 +93,7 @@ export class RepositoryNode extends SubscribeableViewNode {
children.push(new StatusFilesNode(this.view, this, status, range));
}
if (this.view.config.showBranchComparison !== false) {
children.push(new CompareBranchNode(this.uri, this.view, this, branch));
}
children.push(new BranchNode(this.uri, this.view, this, branch, true));
if (!this.view.config.compact) {
children.push(new MessageNode(this.view, this, '', GlyphChars.Dash.repeat(2), ''));

Loading…
Cancel
Save