Queue status updates from network callbacks
This commit is contained in:
committed by
Brandon McGinty
parent
bad4e8172a
commit
df185cc9f5
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user