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) { func (b *Barnard) UpdateGeneralStatus(text string, notice bool) {
b.statusText = text b.postUI(func() {
b.statusNotice = notice b.statusText = text
b.renderGeneralStatus() b.statusNotice = notice
b.renderGeneralStatusNow()
})
} }
func (b *Barnard) renderGeneralStatus() { func (b *Barnard) renderGeneralStatus() {
b.postUI(func() { b.renderGeneralStatusNow() })
}
// renderGeneralStatusNow must run on the UI-owning goroutine.
func (b *Barnard) renderGeneralStatusNow() {
text := b.statusText text := b.statusText
notice := b.statusNotice notice := b.statusNotice
if notice { if notice {