diff options
author | Luka Markušić <luka.markusic@microblink.com> | 2022-04-13 15:46:12 +0200 |
---|---|---|
committer | Luka Markušić <luka.markusic@microblink.com> | 2022-04-13 15:54:32 +0200 |
commit | e114b5b5e8dab86e081f0fe789e1bd902687b727 (patch) | |
tree | 321e2ed4fba8906d74ccf4686b710390d36aab84 /pkg/gui/controllers | |
parent | c4b958e3fddc0b50900def5b32f9ff4246d22a5d (diff) |
Refresh BRANCHES and COMMITS after (un)staging upstream
Diffstat (limited to 'pkg/gui/controllers')
-rw-r--r-- | pkg/gui/controllers/branches_controller.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/pkg/gui/controllers/branches_controller.go b/pkg/gui/controllers/branches_controller.go index 66187e36a..096082ac4 100644 --- a/pkg/gui/controllers/branches_controller.go +++ b/pkg/gui/controllers/branches_controller.go @@ -116,6 +116,15 @@ func (self *BranchesController) setUpstream(selectedBranch *models.Branch) error if err := self.git.Branch.UnsetUpstream(selectedBranch.Name); err != nil { return self.c.Error(err) } + if err := self.c.Refresh(types.RefreshOptions{ + Mode: types.SYNC, + Scope: []types.RefreshableView{ + types.BRANCHES, + types.COMMITS, + }, + }); err != nil { + return self.c.Error(err) + } return nil }, Key: 'u', @@ -132,6 +141,15 @@ func (self *BranchesController) setUpstream(selectedBranch *models.Branch) error if err := self.git.Branch.SetUpstream(upstreamRemote, upstreamBranch, selectedBranch.Name); err != nil { return self.c.Error(err) } + if err := self.c.Refresh(types.RefreshOptions{ + Mode: types.SYNC, + Scope: []types.RefreshableView{ + types.BRANCHES, + types.COMMITS, + }, + }); err != nil { + return self.c.Error(err) + } return nil }) }, |