1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

Convert the bulk of modules over to RedrawFunc

This commit is contained in:
Sean Smith
2019-08-26 23:07:02 -04:00
parent 51e4325f0b
commit 3a716bcf9a
25 changed files with 214 additions and 224 deletions

View File

@@ -59,15 +59,14 @@ func (widget *Widget) Refresh() {
/* -------------------- Unexported Functions -------------------- */
func (widget *Widget) Render() {
if widget.view == nil {
return
}
widget.RedrawFunc(widget.content)
}
func (widget *Widget) content() (string, string, bool) {
title := fmt.Sprintf("%s: [red]%s", widget.CommonSettings().Title, widget.view.Name)
if widget.view == nil {
return title, "No content to display", false
}
var str string
jobs := widget.view.Jobs