mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-07 01:09:45 +02:00
Use ConfirmIf where applicable
This commit is contained in:
@ -25,19 +25,14 @@ func (self *QuitActions) quitAux() error {
|
||||
return self.confirmQuitDuringUpdate()
|
||||
}
|
||||
|
||||
if self.c.UserConfig().ConfirmOnQuit {
|
||||
self.c.Confirm(types.ConfirmOpts{
|
||||
return self.c.ConfirmIf(self.c.UserConfig().ConfirmOnQuit,
|
||||
types.ConfirmOpts{
|
||||
Title: "",
|
||||
Prompt: self.c.Tr.ConfirmQuit,
|
||||
HandleConfirm: func() error {
|
||||
return gocui.ErrQuit
|
||||
},
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
return gocui.ErrQuit
|
||||
}
|
||||
|
||||
func (self *QuitActions) confirmQuitDuringUpdate() error {
|
||||
|
Reference in New Issue
Block a user