- Add Notification PNObjectLocalNotificationUserWillLogout

- Mod PNObjectLocalNotificationUserLogout Logout to PNObjectLocalNotificationUserEndLogout
This commit is contained in:
Giuseppe Nucifora 2016-04-06 16:21:59 +02:00
parent 651ea4a915
commit 878dbdf274
3 changed files with 7 additions and 3 deletions

View File

@ -100,9 +100,10 @@ static bool isFirstAccess = YES;
}
- (void)logout {
[[NSNotificationCenter defaultCenter] postNotificationName:PNObjectLocalNotificationUserWillLogout object:nil];
[self autoRemoveLocally];
[self resetObject];
[[NSNotificationCenter defaultCenter] postNotificationName:PNObjectLocalNotificationUserLogout object:nil];
[[NSNotificationCenter defaultCenter] postNotificationName:PNObjectLocalNotificationUserEndLogout object:nil];
}
- (BOOL) hasValidEmailAndPasswordData {

View File

@ -28,7 +28,9 @@ extern NSString* _Nonnull const PNObjectLocalNotificationRefreshTokenUserFail;
extern NSString* _Nonnull const PNObjectLocalNotificationUserReloadFromServerSuccess;
extern NSString* _Nonnull const PNObjectLocalNotificationUserReloadFromServerFailure;
extern NSString* _Nonnull const PNObjectLocalNotificationUserLogout;
extern NSString* _Nonnull const PNObjectLocalNotificationUserWillLogout;
extern NSString* _Nonnull const PNObjectLocalNotificationUserEndLogout;
#pragma mark -
extern NSString* _Nonnull const EnvironmentProduction;

View File

@ -27,7 +27,8 @@ NSString * const PNObjectLocalNotificationRefreshTokenUserFail = @"PNObjectLocal
NSString * const PNObjectLocalNotificationUserReloadFromServerSuccess = @"PNObjectLocalNotificationUserReloadFromServerSuccess";
NSString * const PNObjectLocalNotificationUserReloadFromServerFailure = @"PNObjectLocalNotificationUserReloadFromServerFailure";
NSString * const PNObjectLocalNotificationUserLogout = @"PNObjectLocalNotificationUserLogout";
NSString * const PNObjectLocalNotificationUserWillLogout = @"PNObjectLocalNotificationUserLogout";
NSString * const PNObjectLocalNotificationUserEndLogout = @"PNObjectLocalNotificationUserLogout";
NSInteger const minPassLenght = 4;