1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-08-08 22:36:49 +02:00

Replace ActivateContext() with Context().Activate()

This commit is contained in:
Stefan Haller
2024-08-08 10:42:40 +02:00
parent 41f41ee4ee
commit d570552206
4 changed files with 2 additions and 7 deletions

View File

@@ -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()
}

View File

@@ -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
}

View File

@@ -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

View File

@@ -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