diff options
Diffstat (limited to 'worker')
-rw-r--r-- | worker/types/worker.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/worker/types/worker.go b/worker/types/worker.go index 7033bf77..b1927b90 100644 --- a/worker/types/worker.go +++ b/worker/types/worker.go @@ -5,7 +5,6 @@ import ( "sync" "sync/atomic" - "git.sr.ht/~rjarry/aerc/lib/ui" "git.sr.ht/~rjarry/aerc/log" "git.sr.ht/~rjarry/aerc/models" ) @@ -101,6 +100,8 @@ func (worker *Worker) PostAction(msg WorkerMessage, cb func(msg WorkerMessage)) } } +var WorkerMessages = make(chan WorkerMessage, 50) + // PostMessage posts an message to the UI. This method should not be called // from the same goroutine that the UI runs in or deadlocks may occur func (worker *Worker) PostMessage(msg WorkerMessage, @@ -114,7 +115,7 @@ func (worker *Worker) PostMessage(msg WorkerMessage, } else { log.Tracef("(%s) PostMessage %T", worker.Name, msg) } - ui.MsgChannel <- msg + WorkerMessages <- msg if cb != nil { worker.Lock() |