configurable directory collapse default value (closes #70)
This commit is contained in:
parent
e153cb4f4a
commit
64d1a3bcc3
@ -98,6 +98,7 @@ func initConfig() {
|
||||
|
||||
viper.SetDefault("diff.hide", "")
|
||||
viper.SetDefault("layer.show-aggregated-changes", false)
|
||||
viper.SetDefault("filetree.collapse-dir", false)
|
||||
|
||||
viper.AutomaticEnv() // read in environment variables that match
|
||||
|
||||
|
@ -6,6 +6,7 @@ import (
|
||||
"crypto/md5"
|
||||
"fmt"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/spf13/viper"
|
||||
"io"
|
||||
)
|
||||
|
||||
@ -61,7 +62,7 @@ func (data *NodeData) Copy() *NodeData {
|
||||
// NewViewInfo creates a default ViewInfo
|
||||
func NewViewInfo() (view *ViewInfo) {
|
||||
return &ViewInfo{
|
||||
Collapsed: false,
|
||||
Collapsed: viper.GetBool("filetree.collapse-dir"),
|
||||
Hidden: false,
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user