Merge branch 'develop' into 'master'

- Fix PNUser



See merge request !5
This commit is contained in:
Giuseppe Nucifora 2016-01-29 12:17:39 +00:00
commit 0b2327f6e3

View File

@ -31,7 +31,7 @@ static bool isFirstAccess = YES;
dispatch_once(&onceToken, ^{
isFirstAccess = NO;
SINGLETON = [[super allocWithZone:NULL] init];
SINGLETON = [[super allocWithZone:NULL] initForCurrentUser];
});
return SINGLETON;
@ -39,21 +39,6 @@ static bool isFirstAccess = YES;
#pragma mark - Life Cycle
+ (instancetype) allocWithZone:(NSZone *)zone
{
return [self currentUser];
}
+ (instancetype)copyWithZone:(struct _NSZone *)zone
{
return [self currentUser];
}
+ (instancetype)mutableCopyWithZone:(struct _NSZone *)zone
{
return [self currentUser];
}
- (instancetype)copy
{
return [[PNUser alloc] init];
@ -64,7 +49,7 @@ static bool isFirstAccess = YES;
return [[PNUser alloc] init];
}
- (id) init
- (instancetype) initForCurrentUser
{
if(SINGLETON){
return SINGLETON;