Skip to content

Commit 3722824

Browse files
authored
Show background fetch status in bottom line (#4215)
- **PR Description** This shows a status as if the user had typed 'f' manually in the files panel. I want this particularly for the first fetch after startup. There are often situations where I need to wait for this first background fetch to be done before I can do what I want (e.g. rebase my branch onto its base branch, or check out a branch that my coworker has told me they just pushed), but currently it's hard to tell when that is. For every subsequent background fetch after the first one it is less important, but it hopefully doesn't hurt, and it might be nice to have some visual indication that background activity is happening.
2 parents 5523680 + 5424785 commit 3722824

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/gui/background.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ func (self *BackgroundRoutineMgr) startBackgroundFetch() {
7676
self.gui.waitForIntro.Wait()
7777

7878
fetch := func() error {
79-
err := self.backgroundFetch()
80-
self.gui.c.Render()
81-
return err
79+
return self.gui.PopupHandler.WithWaitingStatusSync(self.gui.Tr.FetchingStatus, func() error {
80+
return self.backgroundFetch()
81+
})
8282
}
8383

8484
// We want an immediate fetch at startup, and since goEvery starts by

0 commit comments

Comments
 (0)