mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Clean up drawing functionality
Fix up a bunch of missed places that can use the standardized `Redraw` method
This commit is contained in:
@@ -8,12 +8,12 @@ import (
|
||||
|
||||
func (widget *Widget) display() {
|
||||
if ok == false {
|
||||
widget.View.SetText(errorText)
|
||||
widget.Redraw(widget.CommonSettings.Title, errorText, true)
|
||||
return
|
||||
}
|
||||
|
||||
summaryText := widget.summaryText(&widget.summaryList)
|
||||
widget.View.SetText(summaryText)
|
||||
widget.Redraw(widget.CommonSettings.Title, summaryText, false)
|
||||
}
|
||||
|
||||
func (widget *Widget) summaryText(list *summaryList) string {
|
||||
|
||||
@@ -80,9 +80,7 @@ func makeMarketCurrency(name string) *mCurrency {
|
||||
func (widget *Widget) Refresh() {
|
||||
widget.updateSummary()
|
||||
|
||||
widget.app.QueueUpdateDraw(func() {
|
||||
widget.display()
|
||||
})
|
||||
widget.display()
|
||||
}
|
||||
|
||||
/* -------------------- Unexported Functions -------------------- */
|
||||
@@ -142,9 +140,7 @@ func (widget *Widget) updateSummary() {
|
||||
}
|
||||
}
|
||||
|
||||
widget.app.QueueUpdateDraw(func() {
|
||||
widget.display()
|
||||
})
|
||||
widget.display()
|
||||
}
|
||||
|
||||
func makeRequest(baseName, marketName string) *http.Request {
|
||||
|
||||
Reference in New Issue
Block a user