1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-15 01:34:26 +02:00

When pausing a task during a waiting status, hide the status while paused

We do this for two reasons:
- when popping up a credentials prompt, it looks distracting if the waiting
  status keeps spinning while the user is typing the password
- the task that updates the waiting status periodically would keep the program
  busy, so integration tests would wait forever for the program to become idle
  again
This commit is contained in:
Stefan Haller
2023-09-20 08:43:42 +02:00
parent c222a618a8
commit 1359fa14c1
2 changed files with 25 additions and 4 deletions

View File

@ -44,11 +44,11 @@ func NewStatusManager() *StatusManager {
return &StatusManager{}
}
func (self *StatusManager) WithWaitingStatus(message string, renderFunc func(), f func()) {
func (self *StatusManager) WithWaitingStatus(message string, renderFunc func(), f func(*WaitingStatusHandle)) {
handle := &WaitingStatusHandle{statusManager: self, message: message, renderFunc: renderFunc, id: -1}
handle.Show()
f()
f(handle)
handle.Hide()
}