Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Merge pull request #3 from endocode/iaguis/always-draw
Browse files Browse the repository at this point in the history
reader: draw last update even if we didn't draw before.
  • Loading branch information
jzelinskie committed Apr 30, 2015
2 parents 44efc4c + d5dc915 commit 326b3ee
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,18 +80,15 @@ func (r *Reader) drawProgress() {
}

func (r *Reader) finishProgress() {
// Only output the final draw if we drawed prior
if !r.lastDraw.IsZero() {
f := r.drawFunc()
f(r.progress, r.Size)
f := r.drawFunc()
f(r.progress, r.Size)

// Print a newline
f(-1, -1)
// Print a newline
f(-1, -1)

// Reset lastDraw so we don't finish again
var zeroDraw time.Time
r.lastDraw = zeroDraw
}
// Reset lastDraw so we don't finish again
var zeroDraw time.Time
r.lastDraw = zeroDraw
}

func (r *Reader) initProgress() {
Expand Down

0 comments on commit 326b3ee

Please sign in to comment.