浏览代码

fix initial progress stats

Jeffrey Morgan 1 年之前
父节点
当前提交
8c4022b06b
共有 1 个文件被更改,包括 3 次插入4 次删除
  1. 3 4
      progress/bar.go

+ 3 - 4
progress/bar.go

@@ -124,15 +124,14 @@ func (b *Bar) Stats() Stats {
 
 	switch {
 	case b.statted.IsZero():
-	case b.currentValue >= b.maxValue:
 		b.stats = Stats{
-			value:     b.maxValue,
+			value:     b.initialValue,
 			rate:      0,
 			remaining: 0,
 		}
-	case b.statted.IsZero():
+	case b.currentValue >= b.maxValue:
 		b.stats = Stats{
-			value:     b.initialValue,
+			value:     b.maxValue,
 			rate:      0,
 			remaining: 0,
 		}