2020-09-30 00:27:23 +02:00
|
|
|
package presentation
|
|
|
|
|
|
|
|
import (
|
2022-03-19 10:12:58 +02:00
|
|
|
"github.com/jesseduffield/generics/slices"
|
2020-09-30 00:27:23 +02:00
|
|
|
"github.com/jesseduffield/lazygit/pkg/commands/models"
|
|
|
|
"github.com/jesseduffield/lazygit/pkg/theme"
|
|
|
|
)
|
|
|
|
|
|
|
|
func GetSubmoduleListDisplayStrings(submodules []*models.SubmoduleConfig) [][]string {
|
2022-03-19 10:12:58 +02:00
|
|
|
return slices.Map(submodules, func(submodule *models.SubmoduleConfig) []string {
|
|
|
|
return getSubmoduleDisplayStrings(submodule)
|
|
|
|
})
|
2020-09-30 00:27:23 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
func getSubmoduleDisplayStrings(s *models.SubmoduleConfig) []string {
|
2021-07-27 15:00:37 +02:00
|
|
|
return []string{theme.DefaultTextColor.Sprint(s.Name)}
|
2020-09-30 00:27:23 +02:00
|
|
|
}
|