Support multiple accounts. Bug fixes. Improve concurrency.
[pithos-macos] / pithos-macos / LastCompletedSyncTransformer.m
index ecdaf44..8f6b471 100644 (file)
@@ -2,7 +2,7 @@
 //  LastCompletedSyncTransformer.m
 //  pithos-macos
 //
-// Copyright 2011 GRNET S.A. All rights reserved.
+// Copyright 2011-2012 GRNET S.A. All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or
 // without modification, are permitted provided that the following
@@ -49,7 +49,7 @@
 
 - (id)transformedValue:(id)value {
     if (value == nil)
-               return @"Last Sync: -";
+               return @"-";
     
     NSCalendar *calendar = [NSCalendar currentCalendar];
     NSDateComponents *comps = [calendar components:(NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit) fromDate:[NSDate date]];
     NSTimeInterval timeInterval = [[calendar dateFromComponents:comps] timeIntervalSinceDate:(NSDate *)value];
     if (timeInterval < 86400) {
         // Today
-        return [NSString stringWithFormat:@"Last Sync: Today %@", [NSDateFormatter localizedStringFromDate:(NSDate *)value 
+        return [NSString stringWithFormat:@"Today %@", [NSDateFormatter localizedStringFromDate:(NSDate *)value 
                                                                                                      dateStyle:NSDateFormatterNoStyle 
                                                                                                      timeStyle:NSDateFormatterShortStyle]];
     } else if (timeInterval < 172800) {
         // Yesterday
-        return [NSString stringWithFormat:@"Last Sync: Yesterday %@", [NSDateFormatter localizedStringFromDate:(NSDate *)value 
+        return [NSString stringWithFormat:@"Yesterday %@", [NSDateFormatter localizedStringFromDate:(NSDate *)value 
                                                                                            dateStyle:NSDateFormatterNoStyle 
                                                                                            timeStyle:NSDateFormatterShortStyle]];
     } else {
-        return [NSString stringWithFormat:@"Last Sync: %@", [NSDateFormatter localizedStringFromDate:(NSDate *)value 
+        return [NSString stringWithFormat:@"%@", [NSDateFormatter localizedStringFromDate:(NSDate *)value 
                                                                                            dateStyle:NSDateFormatterShortStyle 
                                                                                            timeStyle:NSDateFormatterShortStyle]];
     }