mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-12 12:55:47 +02:00
refactor contexts code
This commit is contained in:
parent
1a74ed3214
commit
138be04e65
60 changed files with 1154 additions and 602 deletions
|
@ -3,23 +3,22 @@ package controllers
|
|||
import (
|
||||
"github.com/jesseduffield/gocui"
|
||||
"github.com/jesseduffield/lazygit/pkg/config"
|
||||
"github.com/jesseduffield/lazygit/pkg/gui/popup"
|
||||
"github.com/jesseduffield/lazygit/pkg/gui/types"
|
||||
)
|
||||
|
||||
type MenuController struct {
|
||||
c *ControllerCommon
|
||||
c *types.ControllerCommon
|
||||
getContext func() types.IListContext
|
||||
|
||||
getSelectedMenuItem func() *popup.MenuItem
|
||||
getSelectedMenuItem func() *types.MenuItem
|
||||
}
|
||||
|
||||
var _ types.IController = &MenuController{}
|
||||
|
||||
func NewMenuController(
|
||||
c *ControllerCommon,
|
||||
c *types.ControllerCommon,
|
||||
getContext func() types.IListContext,
|
||||
getSelectedMenuItem func() *popup.MenuItem,
|
||||
getSelectedMenuItem func() *types.MenuItem,
|
||||
) *MenuController {
|
||||
return &MenuController{
|
||||
c: c,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue