Permalink
Browse files

Merge branch 'master' of github.com:myellow/Less-2-Do

  • Loading branch information...
2 parents a759420 + 255448f commit 691c58aafbe898ecce02adcacb0d0bf542f09ff5 Philip Messlehner committed Jan 18, 2010
Showing with 6 additions and 4 deletions.
  1. +1 −1 Classes/Entities/Context.m
  2. +1 −1 Classes/Entities/Folder.m
  3. +4 −2 Classes/SyncManager.m
@@ -179,7 +179,7 @@ + (NSArray *)getModifiedContexts:(NSError **)error
+ (Context *)getContextWithRemoteId:(NSNumber*)remoteId error:(NSError **)error
{
- NSArray* objects = [Context getContextsWithFilterPredicate:[NSPredicate predicateWithFormat:@"remoteId == %d", remoteId] error:error];
+ NSArray* objects = [Context getContextsWithFilterPredicate:[NSPredicate predicateWithFormat:@"remoteId == %d", [remoteId integerValue]] error:error];
if([objects count] != 1)
return nil;
return [objects objectAtIndex:0];
@@ -240,7 +240,7 @@ + (NSArray *)getModifiedFolders:(NSError **)error
+ (Folder *)getFolderWithRemoteId:(NSNumber*)remoteId error:(NSError **)error
{
- NSArray* objects = [Folder getFoldersWithFilterPredicate:[NSPredicate predicateWithFormat:@"remoteId == %d", remoteId] error:error];
+ NSArray* objects = [Folder getFoldersWithFilterPredicate:[NSPredicate predicateWithFormat:@"remoteId == %d", [remoteId integerValue]] error:error];
if([objects count] != 1)
return nil;
return [objects objectAtIndex:0];
@@ -271,6 +271,8 @@ +(NSString *)gtdErrorMessage:(NSInteger)errorCode
GtdApiContextNotAddedError = 510,
GtdApiContextNotDeletedError = 520,
GtdApiContextNotEditedError = 530*/
+ ALog(@"gtdErrorMessage called with errorCode %d", errorCode);
+ return [NSString stringWithFormat:@"gtdErrorMessage errorCode=%d", errorCode];
switch (errorCode) {
case GtdApiNoConnectionError:
return @"Toodledo API no connection";
@@ -788,9 +790,9 @@ -(BOOL)syncTasksMatchDates
if([localTask.remoteId integerValue] == remoteTask.uid)
{
- //ALog(@"Das remoteDate: %@ das localDate: %@",remoteTask.date_modified,localTask.lastLocalModification);
+ ALog(@"Das remoteDate: %@ das localDate: %@",remoteTask.date_modified,localTask.lastLocalModification);
- if([remoteTask.date_modified compare:localTask.lastLocalModification] == NSOrderedDescending) // Remote aktueller als Folder
+ if([remoteTask.date_modified compare:localTask.lastLocalModification] == NSOrderedDescending || localTask.lastLocalModification == nil) // Remote aktueller als Folder
{
localTask.deleted = [NSNumber numberWithInteger:0]; // verhindere möglichen Löschvorgang
// überschreibe lokale Felder

0 comments on commit 691c58a

Please sign in to comment.