diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2023-03-21 21:16:30 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2023-04-30 13:19:53 +1000 |
commit | 0e5a4c7a3629b3fcbb029f7398ebb2666ffe4a54 (patch) | |
tree | c9df88d6a7bf4a46854fd8b5ff5e99eea90a273f /pkg/gui/context/remotes_context.go | |
parent | 47b91f1ef5c1bf08e56c4ed170e671d985280932 (diff) |
move getModel functions into contexts
Diffstat (limited to 'pkg/gui/context/remotes_context.go')
-rw-r--r-- | pkg/gui/context/remotes_context.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/pkg/gui/context/remotes_context.go b/pkg/gui/context/remotes_context.go index a3593e672..402c1bef4 100644 --- a/pkg/gui/context/remotes_context.go +++ b/pkg/gui/context/remotes_context.go @@ -16,12 +16,11 @@ var ( ) func NewRemotesContext( - getModel func() []*models.Remote, getDisplayStrings func(startIdx int, length int) [][]string, c *types.HelperCommon, ) *RemotesContext { - viewModel := NewBasicViewModel(getModel) + viewModel := NewBasicViewModel(func() []*models.Remote { return c.Model().Remotes }) return &RemotesContext{ BasicViewModel: viewModel, |