From bb46b2b7e15ba839475973ae44d5a833c6f2b265 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Mon, 13 May 2019 16:24:05 -0400 Subject: Spec out review message screen --- lib/ui/grid.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/ui/grid.go') diff --git a/lib/ui/grid.go b/lib/ui/grid.go index f36a16a..5011a81 100644 --- a/lib/ui/grid.go +++ b/lib/ui/grid.go @@ -181,10 +181,10 @@ func (grid *Grid) AddChild(content Drawable) *GridCell { return cell } -func (grid *Grid) RemoveChild(cell *GridCell) { +func (grid *Grid) RemoveChild(content Drawable) { grid.mutex.Lock() - for i, _cell := range grid.cells { - if _cell == cell { + for i, cell := range grid.cells { + if cell.Content == content { grid.cells = append(grid.cells[:i], grid.cells[i+1:]...) break } -- cgit 1.4.1-2-gfad0