diff --git a/pkg/gui/gui_common.go b/pkg/gui/gui_common.go index 0a4db061bca..2b132c3d1e0 100644 --- a/pkg/gui/gui_common.go +++ b/pkg/gui/gui_common.go @@ -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() } diff --git a/pkg/gui/layout.go b/pkg/gui/layout.go index 8c26fef800c..ff792311780 100644 --- a/pkg/gui/layout.go +++ b/pkg/gui/layout.go @@ -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 } diff --git a/pkg/gui/types/common.go b/pkg/gui/types/common.go index ff2c69a1346..b4a731c5952 100644 --- a/pkg/gui/types/common.go +++ b/pkg/gui/types/common.go @@ -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 diff --git a/pkg/gui/types/context.go b/pkg/gui/types/context.go index 4c5f1a7d1cf..27385bbbf53 100644 --- a/pkg/gui/types/context.go +++ b/pkg/gui/types/context.go @@ -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