1
0
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:
Sean Smith
2019-05-11 12:10:30 -04:00
parent e9e62c2065
commit 42821b3102
11 changed files with 13 additions and 38 deletions

View File

@@ -43,7 +43,6 @@ func (widget *Widget) Refresh() {
}
teams, err := Fetch(widget.settings.apiID, widget.settings.apiKey)
widget.View.SetTitle(widget.ContextualTitle(widget.CommonSettings.Title))
if err != nil {
widget.Redraw(widget.CommonSettings.Title, err.Error(), true)
@@ -53,16 +52,6 @@ func (widget *Widget) Refresh() {
}
}
func (widget *Widget) display() {
if widget.teams == nil {
return
}
widget.View.SetWrap(false)
widget.View.Clear()
widget.View.SetText(widget.contentFrom(widget.teams))
}
func (widget *Widget) contentFrom(teams []OnCallTeam) string {
var str string