ios: simplify code
This commit is contained in:
parent
8c0317cac0
commit
211b3b55b1
|
@ -132,8 +132,6 @@ RCT_EXPORT_METHOD(getSpaceUsage: (NSString *)token
|
||||||
if (authResult) {
|
if (authResult) {
|
||||||
if ([authResult isSuccess]) {
|
if ([authResult isSuccess]) {
|
||||||
currentResolve(authResult.accessToken.accessToken);
|
currentResolve(authResult.accessToken.accessToken);
|
||||||
currentResolve = nil;
|
|
||||||
currentReject = nil;
|
|
||||||
} else {
|
} else {
|
||||||
NSString *msg;
|
NSString *msg;
|
||||||
if ([authResult isError]) {
|
if ([authResult isError]) {
|
||||||
|
@ -142,9 +140,10 @@ RCT_EXPORT_METHOD(getSpaceUsage: (NSString *)token
|
||||||
msg = @"OAuth canceled!";
|
msg = @"OAuth canceled!";
|
||||||
}
|
}
|
||||||
currentReject(@"authorize", msg, nil);
|
currentReject(@"authorize", msg, nil);
|
||||||
currentResolve = nil;
|
|
||||||
currentReject = nil;
|
|
||||||
}
|
}
|
||||||
|
currentResolve = nil;
|
||||||
|
currentReject = nil;
|
||||||
|
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
return NO;
|
return NO;
|
||||||
|
|
Loading…
Reference in New Issue