1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-31 14:24:25 +03:00

move more view model logic into the files view model

This commit is contained in:
Jesse Duffield
2022-01-30 14:46:46 +11:00
parent 8ea7b7a62e
commit c084abb378
17 changed files with 392 additions and 323 deletions

View File

@ -334,7 +334,6 @@ type suggestionsPanelState struct {
}
type panelStates struct {
Files *filePanelState
Branches *branchPanelState
Remotes *remotePanelState
RemoteBranches *remoteBranchesState
@ -448,7 +447,6 @@ func (gui *Gui) resetState(filterPath string, reuseState bool) {
BisectInfo: git_commands.NewNullBisectInfo(),
Panels: &panelStates{
// TODO: work out why some of these are -1 and some are 0. Last time I checked there was a good reason but I'm less certain now
Files: &filePanelState{listPanelState{SelectedLineIdx: -1}},
Submodules: &submodulePanelState{listPanelState{SelectedLineIdx: -1}},
Branches: &branchPanelState{listPanelState{SelectedLineIdx: 0}},
Remotes: &remotePanelState{listPanelState{SelectedLineIdx: 0}},