Skip to content
This repository has been archived by the owner on Dec 12, 2022. It is now read-only.

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
giomfo committed Mar 17, 2016
1 parent 175d860 commit 4e129cd
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions MatrixKit/Models/Account/MXKAccount.m
Original file line number Diff line number Diff line change
Expand Up @@ -951,16 +951,16 @@ - (void)cancelBackgroundSync
}
}

[self onBackgroundSyncDoneWithError:[[NSError alloc] init]];
[self onBackgroundSyncDone:[[NSError alloc] init]];
}
}

- (void)onBackgroundSyncDoneWithError:(NSError*)error
- (void)onBackgroundSyncDone:(NSError*)error
{
if (backgroundSyncTimer)
{
[backgroundSyncTimer invalidate];
backgroundSyncTimer = NULL;
backgroundSyncTimer = nil;
}

if (backgroundSyncfails && error)
Expand All @@ -973,8 +973,8 @@ - (void)onBackgroundSyncDoneWithError:(NSError*)error
backgroundSyncDone();
}

backgroundSyncDone = NULL;
backgroundSyncfails = NULL;
backgroundSyncDone = nil;
backgroundSyncfails = nil;

if (backgroundSyncBgTask != UIBackgroundTaskInvalid)
{
Expand All @@ -988,7 +988,7 @@ - (void)onBackgroundSyncDoneWithError:(NSError*)error
{
// Cancel background task
[[UIApplication sharedApplication] endBackgroundTask:localBackgroundSyncBgTask];
NSLog(@"[MXKAccount] onBackgroundSyncDoneWithError : %08lX stop", (unsigned long)localBackgroundSyncBgTask);
NSLog(@"[MXKAccount] onBackgroundSyncDone: %08lX stop", (unsigned long)localBackgroundSyncBgTask);
}
});
}
Expand Down Expand Up @@ -1038,13 +1038,13 @@ - (void)backgroundSync:(unsigned int)timeout success:(void (^)())success failure

[mxSession backgroundSync:timeout success:^{
NSLog(@"[MXKAccount] the background Sync succeeds");
[self onBackgroundSyncDoneWithError:NULL];
[self onBackgroundSyncDone:nil];

}
failure:^(NSError* error) {

NSLog(@"[MXKAccount] the background Sync fails");
[self onBackgroundSyncDoneWithError:error];
[self onBackgroundSyncDone:error];

}

Expand Down

0 comments on commit 4e129cd

Please sign in to comment.