Skip to content

Commit

Permalink
show loading state when amending top commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jesseduffield committed Sep 17, 2020
1 parent 10dde51 commit 14c8b80
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions pkg/gui/files_panel.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,15 +332,17 @@ func (gui *Gui) handleAmendCommitPress() error {
title: strings.Title(gui.Tr.SLocalize("AmendLastCommit")),
prompt: gui.Tr.SLocalize("SureToAmend"),
handleConfirm: func() error {
ok, err := gui.runSyncOrAsyncCommand(gui.GitCommand.AmendHead())
if err != nil {
return err
}
if !ok {
return nil
}
return gui.WithWaitingStatus(gui.Tr.SLocalize("AmendingStatus"), func() error {
ok, err := gui.runSyncOrAsyncCommand(gui.GitCommand.AmendHead())
if err != nil {
return err
}
if !ok {
return nil
}

return gui.refreshSidePanels(refreshOptions{mode: ASYNC})
return gui.refreshSidePanels(refreshOptions{mode: ASYNC})
})
},
})
}
Expand Down

0 comments on commit 14c8b80

Please sign in to comment.