mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-10 15:46:26 -04:00
Remove unused IsRefreshingFiles state
GetIsRefreshingFiles() is never called anywhere in the codebase, so the flag serves no purpose. Remove it from Gui, StateAccessor, and IStateAccessor, and drop the two SetIsRefreshingFiles calls in refreshFilesAndSubmodules that maintained it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
5350b6c37b
commit
b54d4c369b
|
|
@ -735,11 +735,7 @@ func (self *RefreshHelper) refreshBranches(refreshWorktrees bool, keepBranchSele
|
|||
|
||||
func (self *RefreshHelper) refreshFilesAndSubmodules(background bool) error {
|
||||
self.c.Mutexes().RefreshingFilesMutex.Lock()
|
||||
self.c.State().SetIsRefreshingFiles(true)
|
||||
defer func() {
|
||||
self.c.State().SetIsRefreshingFiles(false)
|
||||
self.c.Mutexes().RefreshingFilesMutex.Unlock()
|
||||
}()
|
||||
defer self.c.Mutexes().RefreshingFilesMutex.Unlock()
|
||||
|
||||
if err := self.refreshStateSubmoduleConfigs(); err != nil {
|
||||
return err
|
||||
|
|
|
|||
|
|
@ -111,8 +111,6 @@ type Gui struct {
|
|||
|
||||
PopupHandler types.IPopupHandler
|
||||
|
||||
IsRefreshingFiles bool
|
||||
|
||||
// we use this to decide whether we'll return to the original directory that
|
||||
// lazygit was opened in, or if we'll retain the one we're currently in.
|
||||
RetainOriginalDir bool
|
||||
|
|
@ -175,14 +173,6 @@ func (self *StateAccessor) GetPagerConfig() *config.PagerConfig {
|
|||
return self.gui.pagerConfig
|
||||
}
|
||||
|
||||
func (self *StateAccessor) GetIsRefreshingFiles() bool {
|
||||
return self.gui.IsRefreshingFiles
|
||||
}
|
||||
|
||||
func (self *StateAccessor) SetIsRefreshingFiles(value bool) {
|
||||
self.gui.IsRefreshingFiles = value
|
||||
}
|
||||
|
||||
func (self *StateAccessor) GetShowExtrasWindow() bool {
|
||||
return self.gui.ShowExtrasWindow
|
||||
}
|
||||
|
|
|
|||
|
|
@ -377,8 +377,6 @@ type IStateAccessor interface {
|
|||
// tells us whether we're currently updating lazygit
|
||||
GetUpdating() bool
|
||||
SetUpdating(bool)
|
||||
SetIsRefreshingFiles(bool)
|
||||
GetIsRefreshingFiles() bool
|
||||
GetShowExtrasWindow() bool
|
||||
SetShowExtrasWindow(bool)
|
||||
GetRetainOriginalDir() bool
|
||||
|
|
|
|||
Loading…
Reference in a new issue