diff --git a/pkg/gui/context/patch_explorer_context.go b/pkg/gui/context/patch_explorer_context.go index ee856c5d2..ac8890191 100644 --- a/pkg/gui/context/patch_explorer_context.go +++ b/pkg/gui/context/patch_explorer_context.go @@ -53,7 +53,7 @@ func NewPatchExplorerContext( func(selectedLineIdx int) error { ctx.GetMutex().Lock() defer ctx.GetMutex().Unlock() - return ctx.NavigateTo(ctx.c.IsCurrentContext(ctx), selectedLineIdx) + return ctx.NavigateTo(ctx.c.Context().IsCurrent(ctx), selectedLineIdx) }), ) diff --git a/pkg/gui/controllers/helpers/merge_conflicts_helper.go b/pkg/gui/controllers/helpers/merge_conflicts_helper.go index abf353300..cdf1d4497 100644 --- a/pkg/gui/controllers/helpers/merge_conflicts_helper.go +++ b/pkg/gui/controllers/helpers/merge_conflicts_helper.go @@ -61,7 +61,7 @@ func (self *MergeConflictsHelper) EscapeMerge() error { // to continue the merge/rebase. In that case, we don't want to then push the // files context over it. // So long as both places call OnUIThread, we're fine. - if self.c.IsCurrentContext(self.c.Contexts().MergeConflicts) { + if self.c.Context().IsCurrent(self.c.Contexts().MergeConflicts) { return self.c.Context().Push(self.c.Contexts().Files) } return nil diff --git a/pkg/gui/gui_common.go b/pkg/gui/gui_common.go index d7813a3b0..7667f7ed7 100644 --- a/pkg/gui/gui_common.go +++ b/pkg/gui/gui_common.go @@ -45,10 +45,6 @@ func (self *guiCommon) RunSubprocess(cmdObj oscommands.ICmdObj) (bool, error) { return self.gui.runSubprocessWithSuspense(cmdObj) } -func (self *guiCommon) IsCurrentContext(c types.Context) bool { - return self.gui.State.ContextMgr.IsCurrent(c) -} - func (self *guiCommon) Context() types.IContextMgr { return self.gui.State.ContextMgr } diff --git a/pkg/gui/types/common.go b/pkg/gui/types/common.go index 09613a220..ff2c69a13 100644 --- a/pkg/gui/types/common.go +++ b/pkg/gui/types/common.go @@ -57,8 +57,6 @@ type IGuiCommon interface { RunSubprocess(cmdObj oscommands.ICmdObj) (bool, error) RunSubprocessAndRefresh(oscommands.ICmdObj) error - IsCurrentContext(Context) bool - // TODO: replace the above context-based methods with just using Context() e.g. replace PushContext() with Context().Push() Context() IContextMgr ContextForKey(key ContextKey) Context