diff --git a/Pod/Classes/PNClasses/PNUser.m b/Pod/Classes/PNClasses/PNUser.m index c4e3068..1bde72d 100644 --- a/Pod/Classes/PNClasses/PNUser.m +++ b/Pod/Classes/PNClasses/PNUser.m @@ -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 { diff --git a/Pod/Classes/PNObjectConfig.h b/Pod/Classes/PNObjectConfig.h index 924ef8e..e9fd97c 100644 --- a/Pod/Classes/PNObjectConfig.h +++ b/Pod/Classes/PNObjectConfig.h @@ -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; diff --git a/Pod/Classes/PNObjectConfig.m b/Pod/Classes/PNObjectConfig.m index a3774d1..58b28c9 100644 --- a/Pod/Classes/PNObjectConfig.m +++ b/Pod/Classes/PNObjectConfig.m @@ -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;