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

Replace CurrentStaticContext() with Context().CurrentStatic()

This commit is contained in:
Stefan Haller
2024-08-08 10:28:34 +02:00
parent 7ed94c0410
commit 7f935c1ea8
9 changed files with 10 additions and 15 deletions

View File

@ -94,7 +94,7 @@ func (self *ContextLinesController) applyChange() error {
self.c.Toast(fmt.Sprintf(self.c.Tr.DiffContextSizeChanged, self.c.AppState.DiffContextSize))
self.c.SaveAppStateAndLogError()
currentContext := self.c.CurrentStaticContext()
currentContext := self.c.Context().CurrentStatic()
switch currentContext.GetKey() {
// we make an exception for our staging and patch building contexts because they actually need to refresh their state afterwards.
case context.PATCH_BUILDING_MAIN_CONTEXT_KEY:
@ -117,6 +117,6 @@ func (self *ContextLinesController) checkCanChangeContext() error {
func (self *ContextLinesController) isShowingDiff() bool {
return lo.Contains(
CONTEXT_KEYS_SHOWING_DIFFS,
self.c.CurrentStaticContext().GetKey(),
self.c.Context().CurrentStatic().GetKey(),
)
}