diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-06-11 19:23:09 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2018-06-11 19:23:09 -0400 |
commit | 1c41b63f08d9b46ed558b0b3470cd2a2a9dfaf97 (patch) | |
tree | 22240b2d97d940968f2be4ced794083729550652 /lib | |
parent | e463c38476b96be99b4ae08af4db9e92da9d2a50 (diff) | |
download | aerc-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')
-rw-r--r-- | lib/ui/stack.go | 8 |
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) } } |