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