summaryrefslogtreecommitdiffstats
path: root/pkg/gui/remotes_panel.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2022-12-30 23:24:24 +1100
committerJesse Duffield <jessedduffield@gmail.com>2023-04-30 13:19:52 +1000
commit8edad826caf2fa48bfad33f9f8c4f3ba49a052da (patch)
tree0b49145e4f656e72441199b5a5c30176c898d7a7 /pkg/gui/remotes_panel.go
parent826128a8e03fb50f7287029ebac93c85712faecb (diff)
Begin refactoring gui
This begins a big refactor of moving more code out of the Gui struct into contexts, controllers, and helpers. We also move some code into structs in the gui package purely for the sake of better encapsulation
Diffstat (limited to 'pkg/gui/remotes_panel.go')
-rw-r--r--pkg/gui/remotes_panel.go29
1 files changed, 0 insertions, 29 deletions
diff --git a/pkg/gui/remotes_panel.go b/pkg/gui/remotes_panel.go
deleted file mode 100644
index edaade8a8..000000000
--- a/pkg/gui/remotes_panel.go
+++ /dev/null
@@ -1,29 +0,0 @@
-package gui
-
-import (
- "fmt"
- "strings"
-
- "github.com/jesseduffield/lazygit/pkg/gui/style"
- "github.com/jesseduffield/lazygit/pkg/gui/types"
-)
-
-// list panel functions
-
-func (gui *Gui) remotesRenderToMain() error {
- var task types.UpdateTask
- remote := gui.State.Contexts.Remotes.GetSelected()
- if remote == nil {
- task = types.NewRenderStringTask("No remotes")
- } else {
- task = types.NewRenderStringTask(fmt.Sprintf("%s\nUrls:\n%s", style.FgGreen.Sprint(remote.Name), strings.Join(remote.Urls, "\n")))
- }
-
- return gui.c.RenderToMainViews(types.RefreshMainOpts{
- Pair: gui.c.MainViewPairs().Normal,
- Main: &types.ViewUpdateOpts{
- Title: "Remote",
- Task: task,
- },
- })
-}