Browse Source

Changes to accommodate new data handler class!

v1.2.3
Abhishek Banthia 9 years ago
parent
commit
44128df784
  1. 8
      Clocker/Custom Table Cell Views/CLTimezoneCellView.m

8
Clocker/Custom Table Cell Views/CLTimezoneCellView.m

@ -52,6 +52,14 @@
}]; }];
timezoneObject.customLabel = (customLabelValue.length > 0) ? customLabelValue : CLEmptyString; timezoneObject.customLabel = (customLabelValue.length > 0) ? customLabelValue : CLEmptyString;
if ([timezoneObject.isFavourite isEqualToNumber:@1])
{
NSData *encodedObject = [NSKeyedArchiver archivedDataWithRootObject:timezoneObject];
[[NSUserDefaults standardUserDefaults] setObject:encodedObject
forKey:@"favouriteTimezone"];
}
NSData *newObject = [NSKeyedArchiver archivedDataWithRootObject:timezoneObject]; NSData *newObject = [NSKeyedArchiver archivedDataWithRootObject:timezoneObject];
[panelController.defaultPreferences replaceObjectAtIndex:cellView.rowNumber withObject:newObject]; [panelController.defaultPreferences replaceObjectAtIndex:cellView.rowNumber withObject:newObject];
[[NSUserDefaults standardUserDefaults] setObject:panelController.defaultPreferences forKey:CLDefaultPreferenceKey]; [[NSUserDefaults standardUserDefaults] setObject:panelController.defaultPreferences forKey:CLDefaultPreferenceKey];

Loading…
Cancel
Save