grid: remove unused method Children

The grid method Children returns the children of a grid, and is never
used. The function is reimplemented in both aerc.go and account.go, also
never called.

Remove these unused methods.

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
This commit is contained in:
Tim Culverhouse 2022-09-19 19:20:31 -05:00 committed by Robin Jarry
parent aa01f0f6dc
commit a31606db0d
3 changed files with 0 additions and 19 deletions

View file

@ -94,17 +94,6 @@ func (grid *Grid) Columns(spec []GridSpec) *Grid {
return grid return grid
} }
func (grid *Grid) Children() []Drawable {
grid.mutex.RLock()
defer grid.mutex.RUnlock()
children := make([]Drawable, len(grid.cells))
for i, cell := range grid.cells {
children[i] = cell.Content
}
return children
}
func (grid *Grid) Draw(ctx *Context) { func (grid *Grid) Draw(ctx *Context) {
invalid := grid.invalid invalid := grid.invalid
if invalid { if invalid {

View file

@ -155,10 +155,6 @@ func (acct *AccountView) Name() string {
return acct.acct.Name return acct.acct.Name
} }
func (acct *AccountView) Children() []ui.Drawable {
return acct.grid.Children()
}
func (acct *AccountView) OnInvalidate(onInvalidate func(d ui.Drawable)) { func (acct *AccountView) OnInvalidate(onInvalidate func(d ui.Drawable)) {
acct.grid.OnInvalidate(func(_ ui.Drawable) { acct.grid.OnInvalidate(func(_ ui.Drawable) {
onInvalidate(acct) onInvalidate(acct)

View file

@ -167,10 +167,6 @@ func (aerc *Aerc) Tick() bool {
return more return more
} }
func (aerc *Aerc) Children() []ui.Drawable {
return aerc.grid.Children()
}
func (aerc *Aerc) OnInvalidate(onInvalidate func(d ui.Drawable)) { func (aerc *Aerc) OnInvalidate(onInvalidate func(d ui.Drawable)) {
aerc.grid.OnInvalidate(func(_ ui.Drawable) { aerc.grid.OnInvalidate(func(_ ui.Drawable) {
onInvalidate(aerc) onInvalidate(aerc)