- Fix setUser method in PNInstallation
This commit is contained in:
parent
c2c6e9a299
commit
0c37caed5c
@ -138,6 +138,8 @@
|
||||
|
||||
NSLog(@"%@",[installation JSONFormObject]);
|
||||
|
||||
//[installation setUser:nil];
|
||||
|
||||
}
|
||||
|
||||
- (void) application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings {
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "PNObject"
|
||||
s.version = "0.7.8"
|
||||
s.version = "0.7.9"
|
||||
s.summary = "PNObject is a simple replica of the more complex ParseObject"
|
||||
|
||||
# This description is used to generate tags and improve search results.
|
||||
|
||||
@ -131,16 +131,16 @@ static bool isFirstAccess = YES;
|
||||
}
|
||||
|
||||
- (void) setUser:(PNUser *)user {
|
||||
if (!self.user) {
|
||||
self.user = user;
|
||||
if (!_user) {
|
||||
_user = nil;
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:PNObjectLocalNotificationPNInstallationUserNew object:nil];
|
||||
}
|
||||
else if(self.user.objID != user.objID) {
|
||||
self.user = user;
|
||||
else if(_user.objID != user.objID) {
|
||||
_user = user;
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:PNObjectLocalNotificationPNInstallationUserChange object:nil];
|
||||
}
|
||||
else if (user == nil){
|
||||
self.user = nil;
|
||||
_user = nil;
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:PNObjectLocalNotificationPNInstallationUserDelete object:nil];
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user