diff options
Diffstat (limited to 'pkg/gui/util-common.go')
| -rw-r--r-- | pkg/gui/util-common.go | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/pkg/gui/util-common.go b/pkg/gui/util-common.go index f203bbf..3f6be1a 100644 --- a/pkg/gui/util-common.go +++ b/pkg/gui/util-common.go @@ -1,30 +1,11 @@ package gui import ( - "github.com/isacikgoz/gitbatch/pkg/git" "github.com/isacikgoz/gitbatch/pkg/helpers" "github.com/jroimartin/gocui" log "github.com/sirupsen/logrus" ) -// refreshes the side views of the application for given git.RepoEntity struct -func (gui *Gui) refreshViews(g *gocui.Gui, entity *git.RepoEntity) error { - var err error - if err = gui.updateRemotes(g, entity); err != nil { - return err - } - if err = gui.updateBranch(g, entity); err != nil { - return err - } - if err = gui.updateRemoteBranches(g, entity); err != nil { - return err - } - if err = gui.updateCommits(g, entity); err != nil { - return err - } - return err -} - // focus to next view func (gui *Gui) nextViewOfGroup(g *gocui.Gui, v *gocui.View, group []viewFeature) error { var focusedViewName string @@ -77,22 +58,6 @@ func (gui *Gui) previousViewOfGroup(g *gocui.Gui, v *gocui.View, group []viewFea return nil } -// siwtch the app mode -func (gui *Gui) switchMode(g *gocui.Gui, v *gocui.View) error { - for i, mode := range modes { - if mode == gui.State.Mode { - if i == len(modes)-1 { - gui.State.Mode = modes[0] - break - } - gui.State.Mode = modes[i+1] - break - } - } - gui.updateKeyBindingsView(g, mainViewFeature.Name) - return nil -} - // siwtch the app's mode to fetch func (gui *Gui) switchToFetchMode(g *gocui.Gui, v *gocui.View) error { gui.State.Mode = fetchMode |
