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:
@ -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()
|
||||
}
|
||||
|
Reference in New Issue
Block a user