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:
committed by
Chris Cummer
parent
52d57f1df4
commit
b4bc6d4509
@@ -13,17 +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: "JIRA",
|
||||
RefreshedAt: time.Now(),
|
||||
RefreshInt: Config.UInt("wtf.jira.refreshInterval", 900),
|
||||
},
|
||||
TextWidget: wtf.NewTextWidget("JIRA", "jira"),
|
||||
}
|
||||
|
||||
widget.addView()
|
||||
|
||||
Reference in New Issue
Block a user