diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2021-06-05 15:56:50 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2021-06-06 09:12:49 +1000 |
commit | 9fdf92b226032d39503dbf40ef931d5d017b4235 (patch) | |
tree | 469a401c8b7df10d2ccb7f2b6ba59607c2029042 /pkg/gui/status_panel.go | |
parent | 93bf691fd66cfd19702db2a674c73fbefc244467 (diff) |
more refactoring
WIP
WIP
Diffstat (limited to 'pkg/gui/status_panel.go')
-rw-r--r-- | pkg/gui/status_panel.go | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/pkg/gui/status_panel.go b/pkg/gui/status_panel.go index c682a377d..adf1651ea 100644 --- a/pkg/gui/status_panel.go +++ b/pkg/gui/status_panel.go @@ -23,15 +23,8 @@ func (gui *Gui) refreshStatus() { } status := "" - if currentBranch.Pushables != "" && currentBranch.Pullables != "" { - trackColor := color.FgYellow - if currentBranch.Pushables == "0" && currentBranch.Pullables == "0" { - trackColor = color.FgGreen - } else if currentBranch.Pushables == "?" && currentBranch.Pullables == "?" { - trackColor = color.FgRed - } - - status = utils.ColoredString(fmt.Sprintf("ā%sā%s ", currentBranch.Pushables, currentBranch.Pullables), trackColor) + if currentBranch.IsRealBranch() { + status += presentation.ColoredBranchStatus(currentBranch) + " " } if gui.GitCommand.WorkingTreeState() != commands.REBASE_MODE_NORMAL { @@ -75,7 +68,7 @@ func (gui *Gui) handleStatusClick() error { } cx, _ := gui.Views.Status.Cursor() - upstreamStatus := fmt.Sprintf("ā%sā%s", currentBranch.Pushables, currentBranch.Pullables) + upstreamStatus := presentation.BranchStatus(currentBranch) repoName := utils.GetCurrentRepoName() switch gui.GitCommand.WorkingTreeState() { case commands.REBASE_MODE_REBASING, commands.REBASE_MODE_MERGING: |