Queue status updates from network callbacks

This commit is contained in:
Brandon McGinty (chatgpt)
2026-08-09 23:13:20 -04:00
committed by Brandon McGinty
parent bad4e8172a
commit df185cc9f5
+10 -3
View File
@@ -140,12 +140,19 @@ func (b *Barnard) OnNoiseSuppressionToggle(ui *uiterm.Ui, key uiterm.Key) {
}
func (b *Barnard) UpdateGeneralStatus(text string, notice bool) {
b.statusText = text
b.statusNotice = notice
b.renderGeneralStatus()
b.postUI(func() {
b.statusText = text
b.statusNotice = notice
b.renderGeneralStatusNow()
})
}
func (b *Barnard) renderGeneralStatus() {
b.postUI(func() { b.renderGeneralStatusNow() })
}
// renderGeneralStatusNow must run on the UI-owning goroutine.
func (b *Barnard) renderGeneralStatusNow() {
text := b.statusText
notice := b.statusNotice
if notice {