diff options
author | matejcik <ja@matejcik.cz> | 2019-07-19 14:40:23 +0200 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2019-09-08 11:20:15 +1000 |
commit | 68d5c2bc10a358d75ebbb3bb9d142327be3cbc1a (patch) | |
tree | 0a87e5b0d73a8b51a9faedb95dde014d85b67a79 /pkg/gui/gui.go | |
parent | 7db1fee87772962bf4b80cbc085a1fa3d4687211 (diff) |
use gui.g directly
Diffstat (limited to 'pkg/gui/gui.go')
-rw-r--r-- | pkg/gui/gui.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go index 8d190e079..1278411de 100644 --- a/pkg/gui/gui.go +++ b/pkg/gui/gui.go @@ -620,15 +620,14 @@ func (gui *Gui) goEvery(interval time.Duration, function func() error) { } func (gui *Gui) startBackgroundFetch() { - g := gui.g gui.waitForIntro.Wait() isNew := gui.Config.GetIsNewRepo() if !isNew { time.After(60 * time.Second) } - _, err := gui.fetch(g, g.CurrentView(), false) + _, err := gui.fetch(gui.g, gui.g.CurrentView(), false) if err != nil && strings.Contains(err.Error(), "exit status 128") && isNew { - _ = gui.createConfirmationPanel(g, g.CurrentView(), gui.Tr.SLocalize("NoAutomaticGitFetchTitle"), gui.Tr.SLocalize("NoAutomaticGitFetchBody"), nil, nil) + _ = gui.createConfirmationPanel(gui.g, gui.g.CurrentView(), gui.Tr.SLocalize("NoAutomaticGitFetchTitle"), gui.Tr.SLocalize("NoAutomaticGitFetchBody"), nil, nil) } else { gui.goEvery(time.Second*60, func() error { _, err := gui.fetch(gui.g, gui.g.CurrentView(), false) |