Skip to content
Browse files

Post a notification when the current user is updated

  • Loading branch information...
1 parent 294e3d7 commit 47f46e3cc98452a4b85eae831e2f09e1c5406b95 @soffes soffes committed Aug 14, 2012
Showing with 5 additions and 2 deletions.
  1. +1 −0 CheddarKit/CDKDefines.h
  2. +3 −2 CheddarKit/CDKDefines.m
  3. +1 −0 CheddarKit/CDKPushController.m
View
1 CheddarKit/CDKDefines.h
@@ -48,5 +48,6 @@ extern NSString *const kCDKKeychainServiceName;
extern NSString *const kCDKListDidUpdateNotificationName;
extern NSString *const kCDKPlusDidChangeNotificationName;
+extern NSString *const kCDKUserUpdatedNotificationName;
#endif
View
5 CheddarKit/CDKDefines.m
@@ -32,5 +32,6 @@
#pragma mark - Notifications
-NSString *const kCDKListDidUpdateNotificationName = @"CHListDidUpdateNotification";
-NSString *const kCDKPlusDidChangeNotificationName = @"CHPlusDidChangeNotification";
+NSString *const kCDKListDidUpdateNotificationName = @"CDKListDidUpdateNotification";
+NSString *const kCDKPlusDidChangeNotificationName = @"CDKPlusDidChangeNotification";
+NSString *const kCDKUserUpdatedNotificationName = @"CDKUserUpdatedNotificationName";
View
1 CheddarKit/CDKPushController.m
@@ -115,6 +115,7 @@ - (void)setUserID:(NSString *)userID {
[self.userChannel bindToEvent:@"user-update" block:^(id message) {
CDKUser *user = [CDKUser objectWithDictionary:message];
[user save];
+ [[NSNotificationCenter defaultCenter] postNotificationName:kCDKUserUpdatedNotificationName object:user userInfo:nil];
}];
}

0 comments on commit 47f46e3

Please sign in to comment.
Something went wrong with that request. Please try again.