Skip to content

Commit

Permalink
fix(progress): update branch per changes in d897463
Browse files Browse the repository at this point in the history
  • Loading branch information
meowgorithm committed Mar 31, 2022
1 parent 1394409 commit efd3628
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions progress/progress.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@ func (m Model) Percent() float64 {
// If you're rendering with ViewAs you won't need this.
func (m *Model) SetPercent(p float64) tea.Cmd {
// If the value is at or below the animation threshold, don't animate
if math.Abs(p-m.percent) <= m.animThreshold {
m.percent = asRatio(p)
if math.Abs(p-m.percentShown) <= m.animThreshold {
m.percentShown = asRatio(p)
m.targetPercent = asRatio(p)
return nil
}
Expand Down

0 comments on commit efd3628

Please sign in to comment.