这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@rakeshghasadiya
Copy link

No description provided.

@alindao-charles
Copy link

Please merge this

CGFloat r = components[0];
CGFloat g = components[1];
CGFloat b = components[2];

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure about this change?
This seems more defensive programming that could be legit (I didn't check the git history to find out)

}

NSURL *URL = [NSURL URLWithString:[url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]]];
NSURL *URL = [NSURL URLWithString:[url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLHostAllowedCharacterSet]]];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We recently made a fix somewhere, are you also sure about this change?

NSDictionary * sCalendarEvent = [self serializeCalendarEvent:event];
if(sCalendarEvent != nil){
[serializedCalendarEvents addObject:sCalendarEvent];
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This look like it's the fix you want to push?

return [formedCalendarEvent copy];
} @catch (NSException *exception) {
return nil;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not familiar is iOS code, but this look like it's not that safe to return nil.
What is the goal of this? How does JS should behave with this change?

[formedCalendarEvent setValue:[self availabilityStringMatchingConstant:event.availability] forKey:_availability];

if (event.structuredLocation && event.structuredLocation.title && event.structuredLocation.radius) {
if (event.structuredLocation) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason you remove some safety tests?

if (event.calendar) {
[formedCalendarEvent setValue:@{
@"id": event.calendar.calendarIdentifier?event.calendar.calendarIdentifier: @"tempCalendar",
@"id": event.calendar.calendarIdentifier,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you explain me this change please?

return resolve(@(success));
});
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

??

resolve(sCalendarEvent);
}else{
resolve(@[]);
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks legit 👍

}else{
reject(@"error", @"error finding event", nil);
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does the behave without this change?

@MoOx
Copy link
Collaborator

MoOx commented Jun 11, 2020

It seems you reverted 4cb815b without paying attention :)

@MoOx MoOx mentioned this pull request Jul 30, 2020
@MoOx MoOx closed this in 5864e23 Aug 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants