-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: forward original event names to UI for kits with mapped events #301
base: development
Are you sure you want to change the base?
fix: forward original event names to UI for kits with mapped events #301
Conversation
|
||
if (eventProjection.projectedName) { | ||
projectionDictionary[kMPFRProjectionName] = eventProjection.projectedName; | ||
if (eventProjection.projectedName == currentProjectionName) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Objective-C, you can't use ==
to compare objects (including strings). The ==
will just compare if the pointers are equal, there's no operator overloading. So you need to compare using isEqual:
if (eventProjection.projectedName == currentProjectionName) { | |
if ([eventProjection.projectedName isEqual:currentProjectionName]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jus added this change
@@ -112,19 +112,22 @@ - (instancetype)initWithMessageType:(MPMessageType)messageType execStatus:(MPKit | |||
if (kitFilter.appliedProjections.count > 0) { | |||
NSMutableArray *projections = [[NSMutableArray alloc] initWithCapacity:kitFilter.appliedProjections.count]; | |||
NSMutableDictionary *projectionDictionary; | |||
NSString *currentProjectionName = ((MPEvent *)kitFilter.originalEvent).name; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should check that originalEvent
is an MPEvent
before casting it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added as well
Summary
Testing Plan
Reference Issue (For mParticle employees only. Ignore if you are an outside contributor)