mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-08-29 18:24:21 -05:00
Bounce STASH model updates onto the UI thread
refreshStashEntries now loads the stash entries on the worker and writes Model.StashEntries in an onUIThreadUnlessRepoChanged bounce. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
21f1dc3366
commit
ff7ecf2d2a
@@ -979,9 +979,16 @@ func (self *RefreshHelper) refreshWorktrees() {
|
||||
}
|
||||
|
||||
func (self *RefreshHelper) refreshStashEntries() {
|
||||
self.c.Model().StashEntries = self.c.Git().Loaders.StashLoader.
|
||||
generation := self.c.State().GetRepoGeneration()
|
||||
|
||||
stashEntries := self.c.Git().Loaders.StashLoader.
|
||||
GetStashEntries(self.c.Modes().Filtering.GetPath())
|
||||
|
||||
self.onUIThreadUnlessRepoChanged(generation, func() error {
|
||||
self.c.Model().StashEntries = stashEntries
|
||||
return nil
|
||||
})
|
||||
|
||||
self.refreshView(self.c.Contexts().Stash)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user