Skip to content
This repository has been archived by the owner on Oct 15, 2018. It is now read-only.

Commit

Permalink
Fix crash when consuming more then 100 percent
Browse files Browse the repository at this point in the history
  • Loading branch information
andreamazz committed Nov 19, 2015
1 parent a4e2096 commit 00f5754
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Gulps WatchKit Extension/InterfaceController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ private extension InterfaceHelper {

progressImage.setHidden(false)

let percentage = WatchEntryHelper.sharedHelper.percentage() ?? 0
var percentage = WatchEntryHelper.sharedHelper.percentage() ?? 0
if percentage > 100 {
percentage = 100
}
var delta = percentage - Int(previousPercentage)
if (delta < 0) {
// animate in reverse using negative duration
Expand Down

0 comments on commit 00f5754

Please sign in to comment.