Skip to content

Commit

Permalink
Small tweak to fix progress issue when delegate is a UIProgressView (…
Browse files Browse the repository at this point in the history
…thanks to Roman Busyghin for this fix)
  • Loading branch information
pokeb committed Nov 17, 2008
1 parent 11a5056 commit b770517
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ASIHTTPRequest.m
Expand Up @@ -488,7 +488,7 @@ - (void)updateUploadProgress

// We aren't using a queue, we should just set progress of the indicator
} else {
[ASIHTTPRequest setProgress:(double)(byteCount/postLength) forProgressIndicator:uploadProgressDelegate];
[ASIHTTPRequest setProgress:(double)(1.0*byteCount/postLength) forProgressIndicator:uploadProgressDelegate];
}

}
Expand Down Expand Up @@ -557,7 +557,7 @@ - (void)updateDownloadProgress

// We aren't using a queue, we should just set progress of the indicator to 0
} else if (contentLength > 0) {
[ASIHTTPRequest setProgress:(double)(bytesReadSoFar/contentLength) forProgressIndicator:downloadProgressDelegate];
[ASIHTTPRequest setProgress:(double)(1.0*bytesReadSoFar/contentLength) forProgressIndicator:downloadProgressDelegate];
}
}

Expand Down

0 comments on commit b770517

Please sign in to comment.