Codebase list golang-github-vbauerster-mpb / 54ce425
refactoring forceAutoRefresh => autoRefresh Vladimir Bauer 3 years ago
2 changed file(s) with 7 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
102102 // Useful for testing purposes.
103103 func ForceAutoRefresh() ContainerOption {
104104 return func(s *pState) {
105 s.forceAutoRefresh = true
105 s.autoRefresh = true
106106 }
107107 }
108108
4444 reqWidth int
4545 popCompleted bool
4646 manualRefresh bool
47 forceAutoRefresh bool
47 autoRefresh bool
4848 renderDelay <-chan struct{}
4949 shutdownNotifier chan<- interface{}
5050 queueBars map[*Bar]*Bar
8686 go s.hm.run()
8787
8888 cw := cwriter.New(s.output)
89 if (cw.IsTerminal() || s.forceAutoRefresh) && !s.manualRefresh {
90 s.forceAutoRefresh = true
89 if (cw.IsTerminal() || s.autoRefresh) && !s.manualRefresh {
90 s.autoRefresh = true
9191 go s.newTicker(s.renderDelay != nil)
9292 } else {
93 s.forceAutoRefresh = false
93 s.autoRefresh = false
9494 }
9595
9696 p := &Progress{
249249 }
250250 case <-p.done:
251251 update := make(chan bool)
252 for s.forceAutoRefresh && err == nil {
252 for s.autoRefresh && err == nil {
253253 s.hm.state(update)
254254 if <-update {
255255 err = render()
390390 total: total,
391391 filler: filler,
392392 refreshCh: s.refreshCh,
393 autoRefresh: s.forceAutoRefresh,
393 autoRefresh: s.autoRefresh,
394394 }
395395
396396 if total > 0 {