mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-11-25 22:32:13 +02:00
Move the Ref interface from gui/types to models
This is a type that can be useful for model/backend stuff, so move it there. We are going to use it in the API of the commit loader.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"github.com/jesseduffield/lazygit/pkg/commands/models"
|
||||
"github.com/jesseduffield/lazygit/pkg/gui/controllers/helpers"
|
||||
"github.com/jesseduffield/lazygit/pkg/gui/types"
|
||||
)
|
||||
@@ -9,7 +10,7 @@ var _ types.IController = &SwitchToSubCommitsController{}
|
||||
|
||||
type CanSwitchToSubCommits interface {
|
||||
types.IListContext
|
||||
GetSelectedRef() types.Ref
|
||||
GetSelectedRef() models.Ref
|
||||
ShowBranchHeadsInSubCommits() bool
|
||||
}
|
||||
|
||||
@@ -17,7 +18,7 @@ type CanSwitchToSubCommits interface {
|
||||
// but an attribute on it i.e. the ref of an item.
|
||||
type SwitchToSubCommitsController struct {
|
||||
baseController
|
||||
*ListControllerTrait[types.Ref]
|
||||
*ListControllerTrait[models.Ref]
|
||||
c *ControllerCommon
|
||||
context CanSwitchToSubCommits
|
||||
}
|
||||
@@ -32,7 +33,7 @@ func NewSwitchToSubCommitsController(
|
||||
c,
|
||||
context,
|
||||
context.GetSelectedRef,
|
||||
func() ([]types.Ref, int, int) {
|
||||
func() ([]models.Ref, int, int) {
|
||||
panic("Not implemented")
|
||||
},
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user