mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-31 23:19:40 +02:00
refactor
This commit is contained in:
parent
7d62f103e4
commit
af09223dd5
@ -102,11 +102,6 @@ func (h *listPanelState) GetSelectedLineIdx() int {
|
|||||||
return h.SelectedLineIdx
|
return h.SelectedLineIdx
|
||||||
}
|
}
|
||||||
|
|
||||||
type IListPanelState interface {
|
|
||||||
SetSelectedLineIdx(int)
|
|
||||||
GetSelectedLineIdx() int
|
|
||||||
}
|
|
||||||
|
|
||||||
// for now the staging panel state, unlike the other panel states, is going to be
|
// for now the staging panel state, unlike the other panel states, is going to be
|
||||||
// non-mutative, so that we don't accidentally end up
|
// non-mutative, so that we don't accidentally end up
|
||||||
// with mismatches of data. We might change this in the future
|
// with mismatches of data. We might change this in the future
|
||||||
@ -271,6 +266,8 @@ type guiStateMutexes struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type guiState struct {
|
type guiState struct {
|
||||||
|
// the file panels (files and commit files) can render as a tree, so we have
|
||||||
|
// managers for them which handle rendering a flat list of files in tree form
|
||||||
FileManager *filetree.FileManager
|
FileManager *filetree.FileManager
|
||||||
CommitFileManager *filetree.CommitFileManager
|
CommitFileManager *filetree.CommitFileManager
|
||||||
Submodules []*models.SubmoduleConfig
|
Submodules []*models.SubmoduleConfig
|
||||||
|
@ -30,6 +30,11 @@ type ListContext struct {
|
|||||||
WindowName string
|
WindowName string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type IListPanelState interface {
|
||||||
|
SetSelectedLineIdx(int)
|
||||||
|
GetSelectedLineIdx() int
|
||||||
|
}
|
||||||
|
|
||||||
type ListItem interface {
|
type ListItem interface {
|
||||||
// ID is a SHA when the item is a commit, a filename when the item is a file, 'stash@{4}' when it's a stash entry, 'my_branch' when it's a branch
|
// ID is a SHA when the item is a commit, a filename when the item is a file, 'stash@{4}' when it's a stash entry, 'my_branch' when it's a branch
|
||||||
ID() string
|
ID() string
|
||||||
|
Loading…
x
Reference in New Issue
Block a user