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