1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

use context to return to the correct view

This commit is contained in:
Jesse Duffield
2020-08-23 12:20:49 +10:00
parent 9ca0073cd7
commit 94601b4dc9
24 changed files with 124 additions and 216 deletions

View File

@ -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 {