File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ func (self *BackgroundRoutineMgr) startBackgroundRoutines() {
4343 if userConfig .Git .AutoRefresh {
4444 refreshInterval := userConfig .Refresher .RefreshInterval
4545 if refreshInterval > 0 {
46- go utils .Safe (func () { self .startBackgroundFilesRefresh ( refreshInterval ) } )
46+ go utils .Safe (self .startBackgroundFilesRefresh )
4747 } else {
4848 self .gui .c .Log .Errorf (
4949 "Value of config option 'refresher.refreshInterval' (%d) is invalid, disabling auto-refresh" ,
@@ -92,10 +92,11 @@ func (self *BackgroundRoutineMgr) startBackgroundFetch() {
9292 self .triggerFetch = self .goEvery (time .Second * time .Duration (userConfig .Refresher .FetchInterval ), self .gui .stopChan , fetch )
9393}
9494
95- func (self * BackgroundRoutineMgr ) startBackgroundFilesRefresh (refreshInterval int ) {
95+ func (self * BackgroundRoutineMgr ) startBackgroundFilesRefresh () {
9696 self .gui .waitForIntro .Wait ()
9797
98- self .goEvery (time .Second * time .Duration (refreshInterval ), self .gui .stopChan , func () error {
98+ userConfig := self .gui .UserConfig ()
99+ self .goEvery (time .Second * time .Duration (userConfig .Refresher .RefreshInterval ), self .gui .stopChan , func () error {
99100 self .gui .c .Refresh (types.RefreshOptions {Scope : []types.RefreshableView {types .FILES }})
100101 return nil
101102 })
You can’t perform that action at this time.
0 commit comments