Changing activity status counter to signed integer, to ensure MAX(0,_activityCount) is enforced as expected
This commit is contained in:
parent
390c51a30d
commit
6d213e0bde
2 changed files with 3 additions and 3 deletions
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
@interface AFNetworkActivityIndicatorManager : NSObject {
|
||||
@private
|
||||
NSUInteger _activityCount;
|
||||
NSInteger _activityCount;
|
||||
}
|
||||
|
||||
+ (AFNetworkActivityIndicatorManager *)sharedManager;
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
#import "AFNetworkActivityIndicatorManager.h"
|
||||
|
||||
@interface AFNetworkActivityIndicatorManager ()
|
||||
@property (readwrite, nonatomic, assign) NSUInteger activityCount;
|
||||
@property (readwrite, nonatomic, assign) NSInteger activityCount;
|
||||
@end
|
||||
|
||||
@implementation AFNetworkActivityIndicatorManager
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
return _sharedManager;
|
||||
}
|
||||
|
||||
- (void)setActivityCount:(NSUInteger)activityCount {
|
||||
- (void)setActivityCount:(NSInteger)activityCount {
|
||||
[self willChangeValueForKey:@"activityCount"];
|
||||
_activityCount = MAX(activityCount, 0);
|
||||
[self didChangeValueForKey:@"activityCount"];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue