diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2018-12-12 22:34:20 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2018-12-12 22:34:20 +1100 |
commit | a26c15dafa7e8c80a56ce0f452137e0af16a883e (patch) | |
tree | 29f0222e1709d480fe84055e07fd1ca3c002af5f /pkg/gui/gui.go | |
parent | c71bcc64ed7e3a5dc921b14df53dbe9d2837a20a (diff) |
some fixes for issues around the credentials panel
Diffstat (limited to 'pkg/gui/gui.go')
-rw-r--r-- | pkg/gui/gui.go | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go index 3345be560..b0062dba8 100644 --- a/pkg/gui/gui.go +++ b/pkg/gui/gui.go @@ -457,15 +457,19 @@ func (gui *Gui) fetch(g *gocui.Gui, v *gocui.View, canSskForCredentials bool) (u } func (gui *Gui) updateLoader(g *gocui.Gui) error { - if view, _ := g.View("confirmation"); view != nil { - content := gui.trimmedContent(view) - if strings.Contains(content, "...") { - staticContent := strings.Split(content, "...")[0] + "..." - if err := gui.renderString(g, "confirmation", staticContent+" "+utils.Loader()); err != nil { - return err + gui.g.Update(func(g *gocui.Gui) error { + if view, _ := g.View("confirmation"); view != nil { + content := gui.trimmedContent(view) + if strings.Contains(content, "...") { + staticContent := strings.Split(content, "...")[0] + "..." + if err := gui.synchronousRenderString(g, "confirmation", staticContent+" "+utils.Loader()); err != nil { + return err + } } } - } + return nil + }) + return nil } |