Skip to content

Commit

Permalink
Replace ActivateContext() with Context().Activate()
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanhaller committed Aug 17, 2024
1 parent 41f41ee commit d570552
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 7 deletions.
4 changes: 0 additions & 4 deletions pkg/gui/gui_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@ func (self *guiCommon) ContextForKey(key types.ContextKey) types.Context {
return self.gui.State.ContextMgr.ContextForKey(key)
}

func (self *guiCommon) ActivateContext(context types.Context) error {
return self.gui.State.ContextMgr.Activate(context, types.OnFocusOpts{})
}

func (self *guiCommon) GetAppState() *config.AppState {
return self.gui.Config.GetAppState()
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/gui/layout.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ func (gui *Gui) onInitialViewsCreationForRepo() error {
}

initialContext := gui.c.Context().Current()
if err := gui.c.ActivateContext(initialContext); err != nil {
if err := gui.c.Context().Activate(initialContext, types.OnFocusOpts{}); err != nil {
return err
}

Expand Down
2 changes: 0 additions & 2 deletions pkg/gui/types/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ type IGuiCommon interface {
Context() IContextMgr
ContextForKey(key ContextKey) Context

ActivateContext(context Context) error

GetConfig() config.AppConfigurer
GetAppState() *config.AppState
SaveAppState() error
Expand Down
1 change: 1 addition & 0 deletions pkg/gui/types/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ type IContextMgr interface {
Push(context Context, opts ...OnFocusOpts) error
Pop() error
Replace(context Context) error
Activate(context Context, opts OnFocusOpts) error
Current() Context
CurrentStatic() Context
CurrentSide() Context
Expand Down

0 comments on commit d570552

Please sign in to comment.