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:
@@ -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()
|
||||
}
|
||||
|
@@ -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
|
||||
}
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user