- 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
@@ -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];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user