mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-10 07:36:27 -04:00
Bounce TAGS model updates onto the UI thread
refreshTags now captures the repo generation, loads the tags on the worker, and writes Model.Tags in an onUIThreadUnlessRepoChanged bounce rather than directly from the worker goroutine. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
b203ec57ac
commit
21f1dc3366
|
|
@ -666,12 +666,17 @@ func (self *RefreshHelper) refreshRebaseCommits() error {
|
|||
}
|
||||
|
||||
func (self *RefreshHelper) refreshTags() error {
|
||||
generation := self.c.State().GetRepoGeneration()
|
||||
|
||||
tags, err := self.c.Git().Loaders.TagLoader.GetTags()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
self.c.Model().Tags = tags
|
||||
self.onUIThreadUnlessRepoChanged(generation, func() error {
|
||||
self.c.Model().Tags = tags
|
||||
return nil
|
||||
})
|
||||
|
||||
self.refreshView(self.c.Contexts().Tags)
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Reference in a new issue