Preventing negative values for the activity indicator counter
This commit is contained in:
parent
f523744cf0
commit
e35a88fdef
1 changed files with 3 additions and 0 deletions
|
|
@ -118,6 +118,9 @@ static NSTimeInterval const kAFNetworkActivityIndicatorInvisibilityDelay = 0.17;
|
|||
}
|
||||
|
||||
- (void)decrementActivityCount {
|
||||
if (_activityCount == 0) {
|
||||
return;
|
||||
}
|
||||
[self willChangeValueForKey:@"activityCount"];
|
||||
@synchronized(self) {
|
||||
_activityCount--;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue