mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-04-24 04:46:01 +08:00
Fail out build process when run_command encounters non-zero exit status. Fixed OS X compile issues introduced by automatic network activity indicator. refs #57
This commit is contained in:
@@ -65,6 +65,7 @@
|
||||
*/
|
||||
@property (nonatomic, readonly) NSUInteger count;
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
/**
|
||||
* When YES, this queue will spin the network activity in the menu bar when it is processing
|
||||
* requests
|
||||
@@ -75,6 +76,7 @@
|
||||
* will manipulate the activity indicator indepedently of all others.
|
||||
*/
|
||||
@property (nonatomic) BOOL showsNetworkActivityIndicatorWhenBusy;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Return the global queue
|
||||
|
||||
@@ -32,7 +32,10 @@ static const NSTimeInterval kFlushDelay = 0.3;
|
||||
@synthesize requestTimeout = _requestTimeout;
|
||||
@synthesize suspended = _suspended;
|
||||
@synthesize loadingCount = _loadingCount;
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
@synthesize showsNetworkActivityIndicatorWhenBusy = _showsNetworkActivityIndicatorWhenBusy;
|
||||
#endif
|
||||
|
||||
+ (RKRequestQueue*)sharedQueue {
|
||||
if (!gSharedQueue) {
|
||||
@@ -100,19 +103,23 @@ static const NSTimeInterval kFlushDelay = 0.3;
|
||||
if ([_delegate respondsToSelector:@selector(requestQueueDidBeginLoading:)]) {
|
||||
[_delegate requestQueueDidBeginLoading:self];
|
||||
}
|
||||
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
if (self.showsNetworkActivityIndicatorWhenBusy) {
|
||||
[UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
|
||||
}
|
||||
#endif
|
||||
} else if (_loadingCount > 0 && count == 0) {
|
||||
// Transition from processing to empty
|
||||
if ([_delegate respondsToSelector:@selector(requestQueueDidFinishLoading:)]) {
|
||||
[_delegate requestQueueDidFinishLoading:self];
|
||||
}
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
if (self.showsNetworkActivityIndicatorWhenBusy) {
|
||||
[UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
_loadingCount = count;
|
||||
|
||||
Reference in New Issue
Block a user