From 94601b4dc951de9b1efa08120148d2d9766b637c Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sun, 23 Aug 2020 12:20:49 +1000 Subject: use context to return to the correct view --- pkg/gui/gui.go | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'pkg/gui/gui.go') diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go index c4d0bdf25..88b146d7c 100644 --- a/pkg/gui/gui.go +++ b/pkg/gui/gui.go @@ -555,12 +555,10 @@ func (gui *Gui) showIntroPopupMessage(done chan struct{}) error { } return gui.ask(askOpts{ - returnToView: nil, - returnFocusOnClose: true, - title: "", - prompt: gui.Tr.SLocalize("IntroPopupMessage"), - handleConfirm: onConfirm, - handleClose: onConfirm, + title: "", + prompt: gui.Tr.SLocalize("IntroPopupMessage"), + handleConfirm: onConfirm, + handleClose: onConfirm, }) } @@ -588,10 +586,8 @@ func (gui *Gui) startBackgroundFetch() { err := gui.fetch(false) if err != nil && strings.Contains(err.Error(), "exit status 128") && isNew { _ = gui.ask(askOpts{ - returnToView: gui.g.CurrentView(), - returnFocusOnClose: true, - title: gui.Tr.SLocalize("NoAutomaticGitFetchTitle"), - prompt: gui.Tr.SLocalize("NoAutomaticGitFetchBody"), + title: gui.Tr.SLocalize("NoAutomaticGitFetchTitle"), + prompt: gui.Tr.SLocalize("NoAutomaticGitFetchBody"), }) } else { gui.goEvery(time.Second*60, gui.stopChan, func() error { -- cgit v1.2.3