1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

remove context callback opts

This commit is contained in:
Jesse Duffield
2023-03-21 21:01:58 +11:00
parent 509e3efa70
commit e2db6a1732
19 changed files with 16 additions and 40 deletions

View File

@ -6,18 +6,11 @@ import (
)
type SimpleContext struct {
OnRender func() error
*BaseContext
}
type ContextCallbackOpts struct {
OnRender func() error
}
func NewSimpleContext(baseContext *BaseContext, opts ContextCallbackOpts) *SimpleContext {
func NewSimpleContext(baseContext *BaseContext) *SimpleContext {
return &SimpleContext{
OnRender: opts.OnRender,
BaseContext: baseContext,
}
}
@ -35,7 +28,6 @@ func NewDisplayContext(key types.ContextKey, view *gocui.View, windowName string
Focusable: false,
Transient: false,
}),
ContextCallbackOpts{},
)
}
@ -67,9 +59,6 @@ func (self *SimpleContext) HandleFocusLost(opts types.OnFocusLostOpts) error {
}
func (self *SimpleContext) HandleRender() error {
if self.OnRender != nil {
return self.OnRender()
}
return nil
}