1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

Replace CurrentContext() with Context().Current()

This commit is contained in:
Stefan Haller
2024-08-08 10:26:55 +02:00
parent 8e15451117
commit 7ed94c0410
23 changed files with 24 additions and 29 deletions

View File

@ -34,7 +34,7 @@ func NewLocalCommitsContext(c *ContextCommon) *LocalCommitsContext {
getDisplayStrings := func(startIdx int, endIdx int) [][]string {
selectedCommitHash := ""
if c.CurrentContext().GetKey() == LOCAL_COMMITS_CONTEXT_KEY {
if c.Context().Current().GetKey() == LOCAL_COMMITS_CONTEXT_KEY {
selectedCommit := viewModel.GetSelected()
if selectedCommit != nil {
selectedCommitHash = selectedCommit.Hash

View File

@ -47,7 +47,7 @@ func NewSubCommitsContext(
}
selectedCommitHash := ""
if c.CurrentContext().GetKey() == SUB_COMMITS_CONTEXT_KEY {
if c.Context().Current().GetKey() == SUB_COMMITS_CONTEXT_KEY {
selectedCommit := viewModel.GetSelected()
if selectedCommit != nil {
selectedCommitHash = selectedCommit.Hash