refactor: relocate tview theme initialization to newApplication and remove unused import
This commit is contained in:
parent
01cb4c043b
commit
586b68315b
2 changed files with 1 additions and 2 deletions
|
|
@ -24,6 +24,7 @@ type application struct {
|
|||
}
|
||||
|
||||
func newApplication(cfg *config.Config) *application {
|
||||
tview.Styles = tview.Theme{}
|
||||
app := &application{
|
||||
Application: tview.NewApplication(),
|
||||
cfg: cfg,
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ import (
|
|||
"github.com/ayn2op/discordo/internal/consts"
|
||||
"github.com/ayn2op/discordo/internal/keyring"
|
||||
"github.com/ayn2op/discordo/internal/logger"
|
||||
"github.com/ayn2op/tview"
|
||||
"github.com/diamondburned/arikawa/v3/utils/ws"
|
||||
"github.com/diamondburned/ningen/v3"
|
||||
"github.com/spf13/cobra"
|
||||
|
|
@ -63,7 +62,6 @@ var (
|
|||
}
|
||||
}
|
||||
|
||||
tview.Styles = tview.Theme{}
|
||||
app = newApplication(cfg)
|
||||
return app.run(token)
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue