diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2021-03-21 10:46:43 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2021-03-30 21:57:00 +1100 |
commit | 2b8302bceddc7391ded956418029349a85824c7b (patch) | |
tree | 15abbbf3e50d1037181d3633ed79b7a4855e05a4 /pkg/gui/presentation | |
parent | 1b94462410daa7424f1d050549d4da278da4a02b (diff) |
refactor
Diffstat (limited to 'pkg/gui/presentation')
-rw-r--r-- | pkg/gui/presentation/files.go | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/pkg/gui/presentation/files.go b/pkg/gui/presentation/files.go index 900a5cabe..5cf312c55 100644 --- a/pkg/gui/presentation/files.go +++ b/pkg/gui/presentation/files.go @@ -7,24 +7,7 @@ import ( "github.com/jesseduffield/lazygit/pkg/utils" ) -func GetFileListDisplayStrings(files []*models.File, diffName string, submoduleConfigs []*models.SubmoduleConfig) [][]string { - lines := make([][]string, len(files)) - - for i := range files { - lines[i] = getFileDisplayStrings(files[i], diffName, submoduleConfigs) - } - - return lines -} - -// getFileDisplayStrings returns the display string of branch -func getFileDisplayStrings(f *models.File, diffName string, submoduleConfigs []*models.SubmoduleConfig) []string { - output := GetStatusNodeLine(f.HasUnstagedChanges, f.HasStagedChanges, f.Name, diffName, submoduleConfigs, f) - - return []string{output} -} - -func GetStatusNodeLine(hasUnstagedChanges bool, hasStagedChanges bool, name string, diffName string, submoduleConfigs []*models.SubmoduleConfig, file *models.File) string { +func GetFileLine(hasUnstagedChanges bool, hasStagedChanges bool, name string, diffName string, submoduleConfigs []*models.SubmoduleConfig, file *models.File) string { // potentially inefficient to be instantiating these color // objects with each render red := color.New(color.FgRed) |