Parcourir la source

Clarify configuration fields

ayn2op il y a 3 ans
Parent
commit
58cf6de313
3 fichiers modifiés avec 7 ajouts et 7 suppressions
  1. 3 4
      guilds_tree.go
  2. 3 3
      internal/config/config.go
  3. 1 0
      internal/config/theme.go

+ 3 - 4
guilds_tree.go

@@ -27,12 +27,11 @@ func newGuildsTree() *GuildsTree {
 		root: tview.NewTreeNode(""),
 	}
 
-	gt.SetGraphics(config.Current.Theme.GuildsTree.Graphics)
-	gt.SetRoot(gt.root)
 	gt.SetTopLevel(1)
-	gt.SetSelectedFunc(gt.onSelected)
-
+	gt.SetRoot(gt.root)
+	gt.SetGraphics(config.Current.Theme.GuildsTree.Graphics)
 	gt.SetBackgroundColor(tcell.GetColor(config.Current.Theme.BackgroundColor))
+	gt.SetSelectedFunc(gt.onSelected)
 
 	gt.SetTitle("Guilds")
 	gt.SetTitleColor(tcell.GetColor(config.Current.Theme.TitleColor))

+ 3 - 3
internal/config/config.go

@@ -14,11 +14,11 @@ var Current = defConfig()
 type Config struct {
 	// Mouse indicates whether the mouse is usable or not.
 	Mouse bool `yaml:"mouse"`
-	// MessagesLimit is the number of messages to be retrieved when a text-based channel is selected.
+	// MessagesLimit is the number of messages to fetch when a text-based channel is selected.
 	MessagesLimit uint `yaml:"messages_limit"`
-	// Timestamps indicates whether the message is to be prefixed with the timestamp or not.
+	// Timestamps indicates whether to draw the timestamp in front of the message or not.
 	Timestamps bool `yaml:"timestamps"`
-	// Editor is the editor program to open when the `LaunchEditor` key is pressed. If the value of the field is "default", the `$EDITOR` environment variable is used instead.
+	// Editor is the program to open when the `LaunchEditor` key is pressed. If the value of the field is "default", the `$EDITOR` environment variable is used instead.
 	Editor string `yaml:"editor"`
 
 	Keys  Keys  `yaml:"keys"`

+ 1 - 0
internal/config/theme.go

@@ -2,6 +2,7 @@ package config
 
 type (
 	GuildsTreeTheme struct {
+		// Graphics indicates whether to draw the line graphics to illustrate the hierarchy or not.
 		Graphics bool `yaml:"graphics"`
 	}