pkg/gui: Use 'alert' popups instead of 'confirm' popups where appropriate

Invocations of 'IPopupHandler::Confirm()' that use neither 'HandleConfirm' nor
'HandleClose' can be replaced by 'Alert()'.
This commit is contained in:
Moritz Haase 2022-03-30 09:11:11 +02:00 committed by Jesse Duffield
parent 8fb2acc224
commit e35ab3c5fe

View file

@ -898,10 +898,7 @@ func (gui *Gui) startBackgroundFetch() {
}
err := gui.backgroundFetch()
if err != nil && strings.Contains(err.Error(), "exit status 128") && isNew {
_ = gui.c.Confirm(types.ConfirmOpts{
Title: gui.c.Tr.NoAutomaticGitFetchTitle,
Prompt: gui.c.Tr.NoAutomaticGitFetchBody,
})
_ = gui.c.Alert(gui.c.Tr.NoAutomaticGitFetchTitle, gui.c.Tr.NoAutomaticGitFetchBody)
} else {
gui.goEvery(time.Second*time.Duration(userConfig.Refresher.FetchInterval), gui.stopChan, func() error {
err := gui.backgroundFetch()