Rename AppView -> ViewConext
This commit is contained in:
parent
4bbed7e194
commit
3aace117c0
2 changed files with 6 additions and 5 deletions
|
|
@ -7,7 +7,7 @@ import (
|
|||
)
|
||||
|
||||
// CreateAppContext creates the application context
|
||||
func CreateAppContext(view *views.AppView) *AppContext {
|
||||
func CreateAppContext(view *views.ViewContext) *AppContext {
|
||||
ctx := &AppContext{View: view}
|
||||
|
||||
return ctx
|
||||
|
|
@ -20,5 +20,5 @@ type AppContext struct {
|
|||
DifmToken string
|
||||
IsPlaying bool
|
||||
SpeakerInitialized bool
|
||||
View *views.AppView
|
||||
View *views.ViewContext
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,8 @@ import (
|
|||
"github.com/rivo/tview"
|
||||
)
|
||||
|
||||
type AppView struct {
|
||||
// ViewContext holds references to all the top-level UI elements in the application
|
||||
type ViewContext struct {
|
||||
App *tview.Application
|
||||
ChannelList *tview.List
|
||||
FavoriteList *tview.List
|
||||
|
|
@ -30,8 +31,8 @@ type UIKeybinding struct {
|
|||
}
|
||||
|
||||
// CreateAppView creates the primary application view of di-tui
|
||||
func CreateAppView() *AppView {
|
||||
return &AppView{
|
||||
func CreateAppView() *ViewContext {
|
||||
return &ViewContext{
|
||||
App: tview.NewApplication(),
|
||||
ChannelList: createChannelList(),
|
||||
FavoriteList: createFavoriteList(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue