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/commit_files_context.go | |
parent | 47b91f1ef5c1bf08e56c4ed170e671d985280932 (diff) |
move getModel functions into contexts
Diffstat (limited to 'pkg/gui/context/commit_files_context.go')
-rw-r--r-- | pkg/gui/context/commit_files_context.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pkg/gui/context/commit_files_context.go b/pkg/gui/context/commit_files_context.go index eb5f41074..f7ee4a930 100644 --- a/pkg/gui/context/commit_files_context.go +++ b/pkg/gui/context/commit_files_context.go @@ -18,12 +18,15 @@ var ( ) func NewCommitFilesContext( - getModel func() []*models.CommitFile, getDisplayStrings func(startIdx int, length int) [][]string, c *types.HelperCommon, ) *CommitFilesContext { - viewModel := filetree.NewCommitFileTreeViewModel(getModel, c.Log, c.UserConfig.Gui.ShowFileTree) + viewModel := filetree.NewCommitFileTreeViewModel( + func() []*models.CommitFile { return c.Model().CommitFiles }, + c.Log, + c.UserConfig.Gui.ShowFileTree, + ) return &CommitFilesContext{ CommitFileTreeViewModel: viewModel, |