summary refs log tree commit diff stats
path: root/lib/ui
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-06-11 19:23:09 -0400
committerDrew DeVault <sir@cmpwn.com>2018-06-11 19:23:09 -0400
commit1c41b63f08d9b46ed558b0b3470cd2a2a9dfaf97 (patch)
tree22240b2d97d940968f2be4ced794083729550652 /lib/ui
parente463c38476b96be99b4ae08af4db9e92da9d2a50 (diff)
downloadaerc-1c41b63f08d9b46ed558b0b3470cd2a2a9dfaf97.tar.gz
Move sidebar into account tabs
This is accomplished through a bit of a hack, the statusbar is able to
be a child of multiple dudes
Diffstat (limited to 'lib/ui')
-rw-r--r--lib/ui/stack.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/ui/stack.go b/lib/ui/stack.go
index 3c66f5a..2b97e78 100644
--- a/lib/ui/stack.go
+++ b/lib/ui/stack.go
@@ -8,7 +8,7 @@ import (
 
 type Stack struct {
 	children []Drawable
-	onInvalidate func(d Drawable)
+	onInvalidate []func(d Drawable)
 }
 
 func NewStack() *Stack {
@@ -16,12 +16,12 @@ func NewStack() *Stack {
 }
 
 func (stack *Stack) OnInvalidate(onInvalidate func (d Drawable)) {
-	stack.onInvalidate = onInvalidate
+	stack.onInvalidate = append(stack.onInvalidate, onInvalidate)
 }
 
 func (stack *Stack) Invalidate() {
-	if stack.onInvalidate != nil {
-		stack.onInvalidate(stack)
+	for _, fn := range stack.onInvalidate {
+		fn(stack)
 	}
 }