diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-19 18:41:57 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-23 14:29:18 +1000 |
commit | 2f5d5034dbe4523c44faa58ba6f30c2fef06c128 (patch) | |
tree | bce2590230ef9bc560da11f376c4187c9db0067a /pkg/gui/branches_panel.go | |
parent | a32947e7a777cb1f1bc16ea9693bd3d01519ea4b (diff) |
good progress
Diffstat (limited to 'pkg/gui/branches_panel.go')
-rw-r--r-- | pkg/gui/branches_panel.go | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/pkg/gui/branches_panel.go b/pkg/gui/branches_panel.go index 79b436c4e..a783f49fe 100644 --- a/pkg/gui/branches_panel.go +++ b/pkg/gui/branches_panel.go @@ -76,9 +76,8 @@ func (gui *Gui) refreshBranches() { } gui.State.Branches = builder.Build() - // TODO: if we're in the remotes view and we've just deleted a remote we need to refresh accordingly - if gui.getBranchesView().Context == "local-branches" { - _ = gui.renderLocalBranchesWithSelection() + if err := gui.rerenderIfVisible(gui.Contexts.Branches.Context); err != nil { + gui.Log.Error(err) } gui.refreshStatus() @@ -90,11 +89,11 @@ func (gui *Gui) renderLocalBranchesWithSelection() error { gui.refreshSelectedLine(&gui.State.Panels.Branches.SelectedLine, len(gui.State.Branches)) displayStrings := presentation.GetBranchListDisplayStrings(gui.State.Branches, gui.State.ScreenMode != SCREEN_NORMAL, gui.State.Diff.Ref) gui.renderDisplayStrings(branchesView, displayStrings) - if gui.g.CurrentView() == branchesView { - if err := gui.handleBranchSelect(); err != nil { - return gui.surfaceError(err) - } - } + // if gui.g.CurrentView() == branchesView { + // if err := gui.handleBranchSelect(); err != nil { + // return gui.surfaceError(err) + // } + // } return nil } |