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"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/rivo/tview"
|
|
||||||
"github.com/senorprogrammer/wtf/wtf"
|
"github.com/senorprogrammer/wtf/wtf"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Widget struct {
|
type Widget struct {
|
||||||
wtf.TextWidget
|
wtf.TextWidget
|
||||||
|
|
||||||
app *tview.Application
|
|
||||||
device_token string
|
device_token string
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewWidget(app *tview.Application, pages *tview.Pages) *Widget {
|
func NewWidget() *Widget {
|
||||||
widget := Widget{
|
widget := Widget{
|
||||||
TextWidget: wtf.NewTextWidget(" Blockfolio ", "blockfolio", false),
|
TextWidget: wtf.NewTextWidget(" Blockfolio ", "blockfolio", false),
|
||||||
device_token: wtf.Config.UString("wtf.mods.blockfolio.device_token"),
|
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":
|
case "bittrex":
|
||||||
widgets = append(widgets, bittrex.NewWidget())
|
widgets = append(widgets, bittrex.NewWidget())
|
||||||
case "blockfolio":
|
case "blockfolio":
|
||||||
widgets = append(widgets, blockfolio.NewWidget(app, pages))
|
widgets = append(widgets, blockfolio.NewWidget())
|
||||||
case "circleci":
|
case "circleci":
|
||||||
widgets = append(widgets, circleci.NewWidget())
|
widgets = append(widgets, circleci.NewWidget())
|
||||||
case "clocks":
|
case "clocks":
|
||||||
|
Loading…
x
Reference in New Issue
Block a user