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

Remove a ton of duplication around TextView widget creation

This commit is contained in:
Chris Cummer
2018-04-07 13:55:08 -07:00
committed by Chris Cummer
parent 52d57f1df4
commit b4bc6d4509
14 changed files with 129 additions and 90 deletions

View File

@@ -13,18 +13,12 @@ import (
var Config *config.Config
type Widget struct {
wtf.BaseWidget
View *tview.TextView
wtf.TextWidget
}
func NewWidget() *Widget {
widget := Widget{
BaseWidget: wtf.BaseWidget{
Name: "BambooHR",
RefreshedAt: time.Now(),
RefreshInt: Config.UInt("wtf.bamboohr.refreshInterval", 900),
},
TextWidget: wtf.NewTextWidget("BambooHR", "bamboohr"),
}
widget.addView()