From 2f5d5034dbe4523c44faa58ba6f30c2fef06c128 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Wed, 19 Aug 2020 18:41:57 +1000 Subject: good progress --- pkg/gui/branches_panel.go | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'pkg/gui/branches_panel.go') 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 } -- cgit v1.2.3