diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2022-06-13 11:01:26 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2022-08-06 13:49:11 +1000 |
commit | 524bf83a4a681408c3fb57818f6968cab632e0ae (patch) | |
tree | 8858b4ee8d4670dcdd1637fe5fedf00ff080c154 /pkg/gui/context/remotes_context.go | |
parent | 6dfef08efc5c7f262194c0af35fd777428f33a1a (diff) |
refactor to only have one context per view
Diffstat (limited to 'pkg/gui/context/remotes_context.go')
-rw-r--r-- | pkg/gui/context/remotes_context.go | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/pkg/gui/context/remotes_context.go b/pkg/gui/context/remotes_context.go index 9cb0b6054..0f11908dd 100644 --- a/pkg/gui/context/remotes_context.go +++ b/pkg/gui/context/remotes_context.go @@ -18,9 +18,9 @@ func NewRemotesContext( view *gocui.View, getDisplayStrings func(startIdx int, length int) [][]string, - onFocus func(...types.OnFocusOpts) error, - onRenderToMain func(...types.OnFocusOpts) error, - onFocusLost func() error, + onFocus func(types.OnFocusOpts) error, + onRenderToMain func() error, + onFocusLost func(opts types.OnFocusLostOpts) error, c *types.HelperCommon, ) *RemotesContext { @@ -30,7 +30,7 @@ func NewRemotesContext( BasicViewModel: viewModel, ListContextTrait: &ListContextTrait{ Context: NewSimpleContext(NewBaseContext(NewBaseContextOpts{ - ViewName: "branches", + View: view, WindowName: "branches", Key: REMOTES_CONTEXT_KEY, Kind: types.SIDE_CONTEXT, @@ -41,7 +41,6 @@ func NewRemotesContext( OnRenderToMain: onRenderToMain, }), list: viewModel, - viewTrait: NewViewTrait(view), getDisplayStrings: getDisplayStrings, c: c, }, |