mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-14 17:46:26 -04:00
Replace ActivateContext() with Context().Activate()
This commit is contained in:
parent
41f41ee4ee
commit
d570552206
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue