improve status message handling

This commit is contained in:
Kujtim Hoxha
2025-04-07 19:43:31 +02:00
parent 57a2210d8d
commit f463ce6694
10 changed files with 140 additions and 84 deletions

View File

@@ -107,6 +107,16 @@ func setupSubscriptions(app *app.App) (chan tea.Msg, func()) {
wg.Done()
}()
}
{
sub := app.Status.Subscribe(ctx)
wg.Add(1)
go func() {
for ev := range sub {
ch <- ev
}
wg.Done()
}()
}
return ch, func() {
cancel()
wg.Wait()