mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Simplify the Blockfolio constructor; removes unused params
This commit is contained in:
parent
72c192cabf
commit
d25b178696
@ -7,18 +7,16 @@ import (
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
"github.com/rivo/tview"
|
||||
"github.com/senorprogrammer/wtf/wtf"
|
||||
)
|
||||
|
||||
type Widget struct {
|
||||
wtf.TextWidget
|
||||
|
||||
app *tview.Application
|
||||
device_token string
|
||||
}
|
||||
|
||||
func NewWidget(app *tview.Application, pages *tview.Pages) *Widget {
|
||||
func NewWidget() *Widget {
|
||||
widget := Widget{
|
||||
TextWidget: wtf.NewTextWidget(" Blockfolio ", "blockfolio", false),
|
||||
device_token: wtf.Config.UString("wtf.mods.blockfolio.device_token"),
|
||||
|
2
main.go
2
main.go
@ -180,7 +180,7 @@ func addWidget(app *tview.Application, pages *tview.Pages, widgetName string) {
|
||||
case "bittrex":
|
||||
widgets = append(widgets, bittrex.NewWidget())
|
||||
case "blockfolio":
|
||||
widgets = append(widgets, blockfolio.NewWidget(app, pages))
|
||||
widgets = append(widgets, blockfolio.NewWidget())
|
||||
case "circleci":
|
||||
widgets = append(widgets, circleci.NewWidget())
|
||||
case "clocks":
|
||||
|
Loading…
x
Reference in New Issue
Block a user