diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2021-04-04 23:51:59 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2021-04-06 19:34:32 +1000 |
commit | 4fe512ff3a299102c2bd78bc83b8644582127aae (patch) | |
tree | 5a34eacc1c137a8c98624ba29b757c0a717cf694 /pkg/gui/remotes_panel.go | |
parent | 4197921465a6cb67d5fdd5b63de653493a5ebd41 (diff) |
test
type safe view access
Diffstat (limited to 'pkg/gui/remotes_panel.go')
-rw-r--r-- | pkg/gui/remotes_panel.go | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/pkg/gui/remotes_panel.go b/pkg/gui/remotes_panel.go index 87a401673..5ba52c2ac 100644 --- a/pkg/gui/remotes_panel.go +++ b/pkg/gui/remotes_panel.go @@ -24,9 +24,9 @@ func (gui *Gui) handleRemoteSelect() error { var task updateTask remote := gui.getSelectedRemote() if remote == nil { - task = gui.createRenderStringTask("No remotes") + task = NewRenderStringTask("No remotes") } else { - task = gui.createRenderStringTask(fmt.Sprintf("%s\nUrls:\n%s", utils.ColoredString(remote.Name, color.FgGreen), strings.Join(remote.Urls, "\n"))) + task = NewRenderStringTask(fmt.Sprintf("%s\nUrls:\n%s", utils.ColoredString(remote.Name, color.FgGreen), strings.Join(remote.Urls, "\n"))) } return gui.refreshMainViews(refreshMainOpts{ @@ -57,12 +57,7 @@ func (gui *Gui) refreshRemotes() error { } } - branchesView := gui.getBranchesView() - if branchesView != nil { - return gui.postRefreshUpdate(gui.mustContextForContextKey(branchesView.Context)) - } - - return nil + return gui.postRefreshUpdate(gui.mustContextForContextKey(ContextKey(gui.Views.Branches.Context))) } func (gui *Gui) handleRemoteEnter() error { |