warning clean up
This commit is contained in:
parent
09938cfbf5
commit
3c7f647316
@ -63,7 +63,9 @@
|
|||||||
if ([messageStyle isEqualToString:ValueMessageStyleTopPersistent] || [messageStyle isEqualToString:ValueMessageStyleTop]) {
|
if ([messageStyle isEqualToString:ValueMessageStyleTopPersistent] || [messageStyle isEqualToString:ValueMessageStyleTop]) {
|
||||||
|
|
||||||
alert.topAlertObject = [[MVMCoreTopAlertObject alloc] initWithResponseInfo:responseInfo];
|
alert.topAlertObject = [[MVMCoreTopAlertObject alloc] initWithResponseInfo:responseInfo];
|
||||||
alert.topAlertObject.delegate = actionDelegate;
|
if ([actionDelegate conformsToProtocol:@protocol(MVMCoreTopAlertDelegateProtocol)]) {
|
||||||
|
alert.topAlertObject.delegate = (NSObject <MVMCoreTopAlertDelegateProtocol> *)actionDelegate;
|
||||||
|
}
|
||||||
alert.topAlertObject.pageType = pageType;
|
alert.topAlertObject.pageType = pageType;
|
||||||
alert.type = MFAlertTypeTop;
|
alert.type = MFAlertTypeTop;
|
||||||
} else if ([messageStyle isEqualToString:ValueMessageStylePopup]) {
|
} else if ([messageStyle isEqualToString:ValueMessageStylePopup]) {
|
||||||
@ -99,7 +101,9 @@
|
|||||||
alert.alertStyle = UIAlertControllerStyleAlert;
|
alert.alertStyle = UIAlertControllerStyleAlert;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
alert.alertDelegate = actionDelegate;
|
if ([actionDelegate conformsToProtocol:@protocol(MVMCoreAlertDelegateProtocol)]) {
|
||||||
|
alert.alertDelegate = (NSObject <MVMCoreAlertDelegateProtocol> *)actionDelegate;
|
||||||
|
}
|
||||||
return alert;
|
return alert;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -83,28 +83,28 @@ static void * XXContext = &XXContext;
|
|||||||
- (BOOL)isPaused {
|
- (BOOL)isPaused {
|
||||||
__block BOOL isPaused;
|
__block BOOL isPaused;
|
||||||
dispatch_sync(self.pausedQueue, ^{
|
dispatch_sync(self.pausedQueue, ^{
|
||||||
isPaused = _paused;
|
isPaused = self->_paused;
|
||||||
});
|
});
|
||||||
return isPaused;
|
return isPaused;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setPaused:(BOOL)paused {
|
- (void)setPaused:(BOOL)paused {
|
||||||
dispatch_barrier_async(self.pausedQueue, ^{
|
dispatch_barrier_async(self.pausedQueue, ^{
|
||||||
_paused = paused;
|
self->_paused = paused;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)isDisplayed {
|
- (BOOL)isDisplayed {
|
||||||
__block BOOL isDisplayed;
|
__block BOOL isDisplayed;
|
||||||
dispatch_sync(self.displayedQueue, ^{
|
dispatch_sync(self.displayedQueue, ^{
|
||||||
isDisplayed = _displayed;
|
isDisplayed = self->_displayed;
|
||||||
});
|
});
|
||||||
return isDisplayed;
|
return isDisplayed;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setDisplayed:(BOOL)displayed {
|
- (void)setDisplayed:(BOOL)displayed {
|
||||||
dispatch_barrier_async(self.displayedQueue, ^{
|
dispatch_barrier_async(self.displayedQueue, ^{
|
||||||
_displayed = displayed;
|
self->_displayed = displayed;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -56,42 +56,42 @@
|
|||||||
- (BOOL)isPaused {
|
- (BOOL)isPaused {
|
||||||
__block BOOL isPaused;
|
__block BOOL isPaused;
|
||||||
dispatch_sync(self.pausedQueue, ^{
|
dispatch_sync(self.pausedQueue, ^{
|
||||||
isPaused = _paused;
|
isPaused = self->_paused;
|
||||||
});
|
});
|
||||||
return isPaused;
|
return isPaused;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setPaused:(BOOL)paused {
|
- (void)setPaused:(BOOL)paused {
|
||||||
dispatch_barrier_async(self.pausedQueue, ^{
|
dispatch_barrier_async(self.pausedQueue, ^{
|
||||||
_paused = paused;
|
self->_paused = paused;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)isDisplayed {
|
- (BOOL)isDisplayed {
|
||||||
__block BOOL isDisplayed;
|
__block BOOL isDisplayed;
|
||||||
dispatch_sync(self.displayedQueue, ^{
|
dispatch_sync(self.displayedQueue, ^{
|
||||||
isDisplayed = _displayed;
|
isDisplayed = self->_displayed;
|
||||||
});
|
});
|
||||||
return isDisplayed;
|
return isDisplayed;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setDisplayed:(BOOL)displayed {
|
- (void)setDisplayed:(BOOL)displayed {
|
||||||
dispatch_barrier_async(self.displayedQueue, ^{
|
dispatch_barrier_async(self.displayedQueue, ^{
|
||||||
_displayed = displayed;
|
self->_displayed = displayed;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)isAnimating {
|
- (BOOL)isAnimating {
|
||||||
__block BOOL isAnimating;
|
__block BOOL isAnimating;
|
||||||
dispatch_sync(self.animatingQueue, ^{
|
dispatch_sync(self.animatingQueue, ^{
|
||||||
isAnimating = _animating;
|
isAnimating = self->_animating;
|
||||||
});
|
});
|
||||||
return isAnimating;
|
return isAnimating;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setAnimating:(BOOL)animating {
|
- (void)setAnimating:(BOOL)animating {
|
||||||
dispatch_barrier_async(self.animatingQueue, ^{
|
dispatch_barrier_async(self.animatingQueue, ^{
|
||||||
_animating = animating;
|
self->_animating = animating;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -611,14 +611,14 @@ typedef NS_ENUM(NSUInteger, FreeBeeCampaignState) {
|
|||||||
|
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
if (enable) {
|
if (enable) {
|
||||||
_reachability = [Reachability reachabilityForInternetConnection];
|
self->_reachability = [Reachability reachabilityForInternetConnection];
|
||||||
// Observe the kNetworkReachabilityChangedNotification. When that notification is posted, the method reachabilityChanged will be called.
|
// Observe the kNetworkReachabilityChangedNotification. When that notification is posted, the method reachabilityChanged will be called.
|
||||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reachabilityDidChange:) name:kReachabilityChangedNotification object:nil];
|
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reachabilityDidChange:) name:kReachabilityChangedNotification object:nil];
|
||||||
[_reachability startNotifier];
|
[self->_reachability startNotifier];
|
||||||
} else if (_reachability) {
|
} else if (self->_reachability) {
|
||||||
[[NSNotificationCenter defaultCenter] removeObserver:self name:kReachabilityChangedNotification object:nil];
|
[[NSNotificationCenter defaultCenter] removeObserver:self name:kReachabilityChangedNotification object:nil];
|
||||||
[_reachability stopNotifier];
|
[self->_reachability stopNotifier];
|
||||||
_reachability = nil;
|
self->_reachability = nil;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -67,7 +67,7 @@ static NSString * const STATIC_CACHE_COMPONENT = @"StaticCache.txt";
|
|||||||
// Filled with pages that we do not want to cache on client side.
|
// Filled with pages that we do not want to cache on client side.
|
||||||
static dispatch_once_t onceToken;
|
static dispatch_once_t onceToken;
|
||||||
dispatch_once(&onceToken, ^{
|
dispatch_once(&onceToken, ^{
|
||||||
_pageTypesToNotCache = [NSMutableSet set];
|
self->_pageTypesToNotCache = [NSMutableSet set];
|
||||||
});
|
});
|
||||||
return _pageTypesToNotCache;
|
return _pageTypesToNotCache;
|
||||||
}
|
}
|
||||||
@ -77,7 +77,7 @@ static NSString * const STATIC_CACHE_COMPONENT = @"StaticCache.txt";
|
|||||||
// Filled with modules that we do not want to cache on client side.
|
// Filled with modules that we do not want to cache on client side.
|
||||||
static dispatch_once_t onceToken;
|
static dispatch_once_t onceToken;
|
||||||
dispatch_once(&onceToken, ^{
|
dispatch_once(&onceToken, ^{
|
||||||
_modulesToNotCache = [NSMutableSet set];
|
self->_modulesToNotCache = [NSMutableSet set];
|
||||||
});
|
});
|
||||||
return _modulesToNotCache;
|
return _modulesToNotCache;
|
||||||
}
|
}
|
||||||
@ -382,7 +382,7 @@ static NSString * const STATIC_CACHE_COMPONENT = @"StaticCache.txt";
|
|||||||
// Create in memory cache
|
// Create in memory cache
|
||||||
static dispatch_once_t onceToken;
|
static dispatch_once_t onceToken;
|
||||||
dispatch_once(&onceToken, ^{
|
dispatch_once(&onceToken, ^{
|
||||||
_imgCache = [[NSMutableDictionary alloc] init];
|
self->_imgCache = [[NSMutableDictionary alloc] init];
|
||||||
});
|
});
|
||||||
return _imgCache;
|
return _imgCache;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -44,7 +44,7 @@
|
|||||||
- (BOOL)isExecuting {
|
- (BOOL)isExecuting {
|
||||||
__block BOOL isExecuting;
|
__block BOOL isExecuting;
|
||||||
dispatch_sync(self.executingQueue, ^{
|
dispatch_sync(self.executingQueue, ^{
|
||||||
isExecuting = executing;
|
isExecuting = self->executing;
|
||||||
});
|
});
|
||||||
return isExecuting;
|
return isExecuting;
|
||||||
}
|
}
|
||||||
@ -52,7 +52,7 @@
|
|||||||
- (BOOL)isFinished {
|
- (BOOL)isFinished {
|
||||||
__block BOOL isFinished;
|
__block BOOL isFinished;
|
||||||
dispatch_sync(self.finishedQueue, ^{
|
dispatch_sync(self.finishedQueue, ^{
|
||||||
isFinished = finished;
|
isFinished = self->finished;
|
||||||
});
|
});
|
||||||
return isFinished;
|
return isFinished;
|
||||||
}
|
}
|
||||||
@ -73,14 +73,14 @@
|
|||||||
if ([self isExecuting]) {
|
if ([self isExecuting]) {
|
||||||
[self willChangeValueForKey:@"isExecuting"];
|
[self willChangeValueForKey:@"isExecuting"];
|
||||||
dispatch_barrier_async(self.executingQueue, ^{
|
dispatch_barrier_async(self.executingQueue, ^{
|
||||||
executing = NO;
|
self->executing = NO;
|
||||||
});
|
});
|
||||||
[self didChangeValueForKey:@"isExecuting"];
|
[self didChangeValueForKey:@"isExecuting"];
|
||||||
}
|
}
|
||||||
if (![self isFinished]) {
|
if (![self isFinished]) {
|
||||||
[self willChangeValueForKey:@"isFinished"];
|
[self willChangeValueForKey:@"isFinished"];
|
||||||
dispatch_barrier_async(self.finishedQueue, ^{
|
dispatch_barrier_async(self.finishedQueue, ^{
|
||||||
finished = YES;
|
self->finished = YES;
|
||||||
});
|
});
|
||||||
[self didChangeValueForKey:@"isFinished"];
|
[self didChangeValueForKey:@"isFinished"];
|
||||||
}
|
}
|
||||||
@ -97,7 +97,7 @@
|
|||||||
if (![self isExecuting]) {
|
if (![self isExecuting]) {
|
||||||
[self willChangeValueForKey:@"isExecuting"];
|
[self willChangeValueForKey:@"isExecuting"];
|
||||||
dispatch_barrier_async(self.executingQueue, ^{
|
dispatch_barrier_async(self.executingQueue, ^{
|
||||||
executing = YES;
|
self->executing = YES;
|
||||||
});
|
});
|
||||||
[self didChangeValueForKey:@"isExecuting"];
|
[self didChangeValueForKey:@"isExecuting"];
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user