mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Renormalize the redraw function
Have all instances take a function Update the remaining modules to take this into account Numerous smaller refactors to make some widgets work more or less the same
This commit is contained in:
@@ -42,7 +42,7 @@ func (widget *Widget) Refresh() {
|
||||
if monitorErr != nil {
|
||||
widget.monitors = nil
|
||||
widget.SetItemCount(0)
|
||||
widget.Redraw(widget.CommonSettings().Title, monitorErr.Error(), true)
|
||||
widget.Redraw(func() (string, string, bool) { return widget.CommonSettings().Title, monitorErr.Error(), true })
|
||||
return
|
||||
}
|
||||
triggeredMonitors := []datadog.Monitor{}
|
||||
@@ -60,7 +60,7 @@ func (widget *Widget) Refresh() {
|
||||
}
|
||||
|
||||
func (widget *Widget) Render() {
|
||||
widget.RedrawFunc(widget.content)
|
||||
widget.Redraw(widget.content)
|
||||
}
|
||||
|
||||
func (widget *Widget) HelpText() string {
|
||||
|
||||
Reference in New Issue
Block a user