Przeglądaj źródła

Add config option to disable auto-expanding folders (#367)

cyberme0w 2 lat temu
rodzic
commit
c1b3597b8c
3 zmienionych plików z 3 dodań i 0 usunięć
  1. 1 0
      cmd/guilds_tree.go
  2. 1 0
      internal/config/config.go
  3. 1 0
      internal/config/config.yml

+ 1 - 0
cmd/guilds_tree.go

@@ -53,6 +53,7 @@ func (gt *GuildsTree) createGuildFolderNode(parent *tview.TreeNode, gf gateway.G
 	}
 
 	n := tview.NewTreeNode(name)
+	n.SetExpanded(cfg.Theme.GuildsTree.AutoExpandFolders)
 	parent.AddChild(n)
 
 	for _, gid := range gf.GuildIDs {

+ 1 - 0
internal/config/config.go

@@ -66,6 +66,7 @@ type Config struct {
 		BackgroundColor string `yaml:"background_color"`
 
 		GuildsTree struct {
+			AutoExpandFolders bool `yaml:"auto_expand_folders"`
 			Graphics bool `yaml:"graphics"`
 		} `yaml:"guilds_tree"`
 

+ 1 - 0
internal/config/config.yml

@@ -49,6 +49,7 @@ theme:
   background_color: default
 
   guilds_tree:
+    auto_expand_folders: true
     graphics: true
 
   messages_text: