Skip to content

Commit b42be69

Browse files
committed
fix ui lockup
1 parent c8a2682 commit b42be69

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

internal/ui/util/ui_eventbus.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ import (
88

99
func SubscribeUI[T any](emitter *util.Emitter[T], app *tview.Application, callback func(v T)) {
1010
emitter.Subscribe(func(v T) {
11-
app.QueueUpdateDraw(func() {
12-
callback(v)
13-
})
11+
go func() {
12+
app.QueueUpdateDraw(func() {
13+
callback(v)
14+
})
15+
}()
1416
})
1517
}

0 commit comments

Comments
 (0)