mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-10 15:46:26 -04:00
Bounce explicit LocalCommits render in refreshBranches to UI thread
refreshBranches runs on a worker goroutine and re-renders the commits view directly to refresh the branch-head visualization. As with refreshView, this currently only flushes because HandleRender ends with self.c.Render(). Wrap the explicit HandleRender call (along with the LocalCommitsMutex pair around it) in OnUIThread so it keeps working once Render() is removed.
This commit is contained in:
parent
0d1caf5c22
commit
a364a8d75c
|
|
@ -532,9 +532,12 @@ func (self *RefreshHelper) refreshBranches(refreshWorktrees bool, keepBranchSele
|
|||
|
||||
// Need to re-render the commits view because the visualization of local
|
||||
// branch heads might have changed
|
||||
self.c.Mutexes().LocalCommitsMutex.Lock()
|
||||
self.c.Contexts().LocalCommits.HandleRender()
|
||||
self.c.Mutexes().LocalCommitsMutex.Unlock()
|
||||
self.c.OnUIThread(func() error {
|
||||
self.c.Mutexes().LocalCommitsMutex.Lock()
|
||||
self.c.Contexts().LocalCommits.HandleRender()
|
||||
self.c.Mutexes().LocalCommitsMutex.Unlock()
|
||||
return nil
|
||||
})
|
||||
|
||||
self.refreshStatus()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue