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

pkg/gui: Rename IPopupHandler::Ask() to Confirm()

Follow the JavaScript naming scheme for user interaction (alert, prompt,
confirm) as discussed in #1832.
This commit is contained in:
Moritz Haase
2022-03-30 08:48:29 +02:00
committed by Jesse Duffield
parent f2fb6453a1
commit 8fb2acc224
26 changed files with 66 additions and 64 deletions

View File

@ -83,7 +83,7 @@ func (self *StashController) handleStashApply(stashEntry *models.StashEntry) err
return apply()
}
return self.c.Ask(types.AskOpts{
return self.c.Confirm(types.ConfirmOpts{
Title: self.c.Tr.StashApply,
Prompt: self.c.Tr.SureApplyStashEntry,
HandleConfirm: func() error {
@ -107,7 +107,7 @@ func (self *StashController) handleStashPop(stashEntry *models.StashEntry) error
return pop()
}
return self.c.Ask(types.AskOpts{
return self.c.Confirm(types.ConfirmOpts{
Title: self.c.Tr.StashPop,
Prompt: self.c.Tr.SurePopStashEntry,
HandleConfirm: func() error {
@ -117,7 +117,7 @@ func (self *StashController) handleStashPop(stashEntry *models.StashEntry) error
}
func (self *StashController) handleStashDrop(stashEntry *models.StashEntry) error {
return self.c.Ask(types.AskOpts{
return self.c.Confirm(types.ConfirmOpts{
Title: self.c.Tr.StashDrop,
Prompt: self.c.Tr.SureDropStashEntry,
HandleConfirm: func() error {