mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-15 00:15:32 +02:00
Cleanup: remove now unused ListControllerTrait from SwitchToDiffFilesController
This commit is contained in:
@ -15,11 +15,10 @@ type CanSwitchToDiffFiles interface {
|
|||||||
GetSelectedRefRangeForDiffFiles() *types.RefRange
|
GetSelectedRefRangeForDiffFiles() *types.RefRange
|
||||||
}
|
}
|
||||||
|
|
||||||
// Not using our ListControllerTrait because our 'selected' item is not a list item
|
// Not using our ListControllerTrait because we have our own way of working with
|
||||||
// but an attribute on it i.e. the ref of an item.
|
// range selections that's different from ListControllerTrait's
|
||||||
type SwitchToDiffFilesController struct {
|
type SwitchToDiffFilesController struct {
|
||||||
baseController
|
baseController
|
||||||
*ListControllerTrait[types.Ref]
|
|
||||||
c *ControllerCommon
|
c *ControllerCommon
|
||||||
context CanSwitchToDiffFiles
|
context CanSwitchToDiffFiles
|
||||||
}
|
}
|
||||||
@ -30,16 +29,8 @@ func NewSwitchToDiffFilesController(
|
|||||||
) *SwitchToDiffFilesController {
|
) *SwitchToDiffFilesController {
|
||||||
return &SwitchToDiffFilesController{
|
return &SwitchToDiffFilesController{
|
||||||
baseController: baseController{},
|
baseController: baseController{},
|
||||||
ListControllerTrait: NewListControllerTrait[types.Ref](
|
c: c,
|
||||||
c,
|
context: context,
|
||||||
context,
|
|
||||||
context.GetSelectedRef,
|
|
||||||
func() ([]types.Ref, int, int) {
|
|
||||||
panic("Not implemented")
|
|
||||||
},
|
|
||||||
),
|
|
||||||
c: c,
|
|
||||||
context: context,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -56,6 +47,10 @@ func (self *SwitchToDiffFilesController) GetKeybindings(opts types.KeybindingsOp
|
|||||||
return bindings
|
return bindings
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (self *SwitchToDiffFilesController) Context() types.Context {
|
||||||
|
return self.context
|
||||||
|
}
|
||||||
|
|
||||||
func (self *SwitchToDiffFilesController) GetOnClick() func() error {
|
func (self *SwitchToDiffFilesController) GetOnClick() func() error {
|
||||||
return func() error {
|
return func() error {
|
||||||
if self.canEnter() == nil {
|
if self.canEnter() == nil {
|
||||||
|
Reference in New Issue
Block a user