summaryrefslogtreecommitdiffstats
path: root/pkg/gui/remotes_panel.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2022-01-30 09:53:28 +1100
committerJesse Duffield <jessedduffield@gmail.com>2022-03-17 19:13:40 +1100
commit51547e38227b2443de955f4d17d46429039cf9f1 (patch)
treec1d8eccaa7736713b01cb00b574e9ed65c60bc8d /pkg/gui/remotes_panel.go
parente363606fb6eeff130e38466f5a63a3a8c0e6ec0d (diff)
move all refresh code into the one file
Diffstat (limited to 'pkg/gui/remotes_panel.go')
-rw-r--r--pkg/gui/remotes_panel.go24
1 files changed, 0 insertions, 24 deletions
diff --git a/pkg/gui/remotes_panel.go b/pkg/gui/remotes_panel.go
index 1c086e2fc..8e55cd33b 100644
--- a/pkg/gui/remotes_panel.go
+++ b/pkg/gui/remotes_panel.go
@@ -6,7 +6,6 @@ import (
"github.com/jesseduffield/lazygit/pkg/commands/models"
"github.com/jesseduffield/lazygit/pkg/gui/style"
- "github.com/jesseduffield/lazygit/pkg/gui/types"
)
// list panel functions
@@ -36,26 +35,3 @@ func (gui *Gui) remotesRenderToMain() error {
},
})
}
-
-func (gui *Gui) refreshRemotes() error {
- prevSelectedRemote := gui.getSelectedRemote()
-
- remotes, err := gui.git.Loaders.Remotes.GetRemotes()
- if err != nil {
- return gui.c.Error(err)
- }
-
- gui.State.Remotes = remotes
-
- // we need to ensure our selected remote branches aren't now outdated
- if prevSelectedRemote != nil && gui.State.RemoteBranches != nil {
- // find remote now
- for _, remote := range remotes {
- if remote.Name == prevSelectedRemote.Name {
- gui.State.RemoteBranches = remote.Branches
- }
- }
- }
-
- return gui.c.PostRefreshUpdate(gui.mustContextForContextKey(types.ContextKey(gui.Views.Branches.Context)))
-}