Permalink
Browse files

Do not decrease progress during one progress-run

  • Loading branch information...
1 parent 92b757c commit 10167703b0fcc19b3ead5f91e9aa7f8d5474f946 @myell0w committed Nov 20, 2011
Showing with 6 additions and 1 deletion.
  1. +6 −1 MTStatusBarOverlay.m
@@ -886,7 +886,12 @@ - (void)rotateToStatusBarFrame:(NSValue *)statusBarFrameValue {
- (void)setProgress:(double)progress {
// bound progress to 0.0 - 1.0
- progress_ = MAX(0.0, MIN(progress, 1.0));
+ progress = MAX(0.0, MIN(progress, 1.0));
+
+ // do not decrease progress if it is no reset
+ if (progress == 0.0 || progress > progress_) {
+ progress_ = progress;
+ }
// update UI on main thread
[self performSelectorOnMainThread:@selector(updateProgressViewSizeForLabel:) withObject:self.visibleStatusLabel waitUntilDone:NO];

0 comments on commit 1016770

Please sign in to comment.