rename header to heditors
This commit is contained in:
parent
03fa9ad99b
commit
e7d450c61d
1 changed files with 6 additions and 6 deletions
|
@ -43,7 +43,7 @@ type Composer struct {
|
||||||
editor *Terminal
|
editor *Terminal
|
||||||
email *os.File
|
email *os.File
|
||||||
grid *ui.Grid
|
grid *ui.Grid
|
||||||
header *ui.Grid
|
heditors *ui.Grid // from, to, cc display a user can jump to
|
||||||
msgId string
|
msgId string
|
||||||
review *reviewMessage
|
review *reviewMessage
|
||||||
worker *types.Worker
|
worker *types.Worker
|
||||||
|
@ -670,7 +670,7 @@ func (c *Composer) AddEditor(header string, value string, appendHeader bool) {
|
||||||
|
|
||||||
// updateGrid should be called when the underlying header layout is changed.
|
// updateGrid should be called when the underlying header layout is changed.
|
||||||
func (c *Composer) updateGrid() {
|
func (c *Composer) updateGrid() {
|
||||||
header, height := c.layout.grid(
|
heditors, height := c.layout.grid(
|
||||||
func(h string) ui.Drawable { return c.editors[h] },
|
func(h string) ui.Drawable { return c.editors[h] },
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -686,11 +686,11 @@ func (c *Composer) updateGrid() {
|
||||||
{ui.SIZE_WEIGHT, ui.Const(1)},
|
{ui.SIZE_WEIGHT, ui.Const(1)},
|
||||||
})
|
})
|
||||||
|
|
||||||
if c.header != nil {
|
if c.heditors != nil {
|
||||||
c.grid.RemoveChild(c.header)
|
c.grid.RemoveChild(c.heditors)
|
||||||
}
|
}
|
||||||
c.header = header
|
c.heditors = heditors
|
||||||
c.grid.AddChild(c.header).At(0, 0)
|
c.grid.AddChild(c.heditors).At(0, 0)
|
||||||
c.grid.AddChild(ui.NewFill(' ')).At(1, 0)
|
c.grid.AddChild(ui.NewFill(' ')).At(1, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue