mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Make Google Spreadsheet widget work with new module lazy-loading
This commit is contained in:
parent
1b00c032bc
commit
5ee5557878
@ -3,8 +3,8 @@ package gspreadsheets
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/senorprogrammer/wtf/wtf"
|
||||
"github.com/olebedev/config"
|
||||
"github.com/senorprogrammer/wtf/wtf"
|
||||
sheets "google.golang.org/api/sheets/v4"
|
||||
)
|
||||
|
||||
@ -26,10 +26,6 @@ func NewWidget() *Widget {
|
||||
/* -------------------- Exported Functions -------------------- */
|
||||
|
||||
func (widget *Widget) Refresh() {
|
||||
if widget.Disabled() {
|
||||
return
|
||||
}
|
||||
|
||||
cells, _ := Fetch()
|
||||
|
||||
widget.UpdateRefreshedAt()
|
||||
|
6
wtf.go
6
wtf.go
@ -17,10 +17,10 @@ import (
|
||||
"github.com/senorprogrammer/wtf/cryptoexchanges/bittrex"
|
||||
"github.com/senorprogrammer/wtf/cryptoexchanges/cryptolive"
|
||||
"github.com/senorprogrammer/wtf/gcal"
|
||||
"github.com/senorprogrammer/wtf/gspreadsheets"
|
||||
"github.com/senorprogrammer/wtf/git"
|
||||
"github.com/senorprogrammer/wtf/github"
|
||||
"github.com/senorprogrammer/wtf/gitlab"
|
||||
"github.com/senorprogrammer/wtf/gspreadsheets"
|
||||
"github.com/senorprogrammer/wtf/help"
|
||||
"github.com/senorprogrammer/wtf/ipinfo"
|
||||
"github.com/senorprogrammer/wtf/ipinfohigherlimit"
|
||||
@ -190,6 +190,8 @@ func addWidget(app *tview.Application, pages *tview.Pages, widgetName string) {
|
||||
Widgets = append(Widgets, github.NewWidget(app, pages))
|
||||
case "gitlab":
|
||||
Widgets = append(Widgets, gitlab.NewWidget(app, pages))
|
||||
case "gspreadsheets":
|
||||
Widgets = append(Widgets, gspreadsheets.NewWidget())
|
||||
case "ipinfo":
|
||||
Widgets = append(Widgets, ipinfo.NewWidget())
|
||||
case "ipinfohigherlimit":
|
||||
@ -231,10 +233,10 @@ func makeWidgets(app *tview.Application, pages *tview.Pages) {
|
||||
cmdrunner.Config = Config
|
||||
cryptolive.Config = Config
|
||||
gcal.Config = Config
|
||||
gspreadsheets.Config = Config
|
||||
git.Config = Config
|
||||
github.Config = Config
|
||||
gitlab.Config = Config
|
||||
gspreadsheets.Config = Config
|
||||
ipinfo.Config = Config
|
||||
ipinfohigherlimit.Config = Config
|
||||
jira.Config = Config
|
||||
|
Loading…
x
Reference in New Issue
Block a user