Skip to content

Commit

Permalink
[MB-1214] Call resetPendingTags withouth the nil check.
Browse files Browse the repository at this point in the history
  • Loading branch information
hcrowell committed Jun 16, 2015
1 parent 0d1288c commit b629f4e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Airship/Push/UANamedUser.m
Expand Up @@ -264,7 +264,7 @@ - (void)updateTags {
NSMutableDictionary *addTags = [self.pendingAddTags mutableCopy];
NSMutableDictionary *removeTags = [self.pendingRemoveTags mutableCopy];

// On failure or background task expires we need to reset the pending tags
// On failure or background task expiration we need to reset the pending tags
void (^resetPendingTags)() = ^{
[self resetPendingTagsWithAddTags:addTags removeTags:removeTags];
};
Expand Down Expand Up @@ -304,7 +304,7 @@ - (void)updateTags {
UA_LDEBUG(@"Named user tags failed to update.");

NSInteger status = request.response.statusCode;
if (status != 400 && status != 403 && resetPendingTags) {
if (status != 400 && status != 403) {
resetPendingTags();
}

Expand Down
4 changes: 2 additions & 2 deletions Airship/Push/UAPush.m
Expand Up @@ -911,7 +911,7 @@ - (void)updateChannelTagGroups {
NSMutableDictionary *addTags = [self.pendingAddTags mutableCopy];
NSMutableDictionary *removeTags = [self.pendingRemoveTags mutableCopy];

// On failure or background task expires we need to reset the pending tags
// On failure or background task expiration we need to reset the pending tags
void (^resetPendingTags)() = ^{
[self resetPendingTagsWithAddTags:addTags removeTags:removeTags];
};
Expand Down Expand Up @@ -951,7 +951,7 @@ - (void)updateChannelTagGroups {
UA_LDEBUG(@"Tag groups failed to update.");

NSInteger status = request.response.statusCode;
if (status != 400 && status != 403 && resetPendingTags) {
if (status != 400 && status != 403) {
resetPendingTags();
}

Expand Down

0 comments on commit b629f4e

Please sign in to comment.