-
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?
Changes from 3 commits
92f5ffe
7afd1a5
435230d
56f2856
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line 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; | ||||||
|
||||||
for (MPEventProjection *eventProjection in kitFilter.appliedProjections) { | ||||||
projectionDictionary = [[NSMutableDictionary alloc] initWithCapacity:4]; | ||||||
projectionDictionary[kMPFRProjectionId] = @(eventProjection.projectionId); | ||||||
projectionDictionary[kMPMessageTypeKey] = NSStringFromMessageType(messageType); | ||||||
|
||||||
projectionDictionary[kMPEventTypeKey] = NSStringFromEventType(eventProjection.eventType); | ||||||
|
||||||
if (eventProjection.projectedName) { | ||||||
projectionDictionary[kMPFRProjectionName] = eventProjection.projectedName; | ||||||
if (eventProjection.projectedName == currentProjectionName) { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In Objective-C, you can't use
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. jus added this change |
||||||
projectionDictionary = [[NSMutableDictionary alloc] initWithCapacity:4]; | ||||||
projectionDictionary[kMPFRProjectionId] = @(eventProjection.projectionId); | ||||||
projectionDictionary[kMPMessageTypeKey] = NSStringFromMessageType(messageType); | ||||||
|
||||||
projectionDictionary[kMPEventTypeKey] = NSStringFromEventType(eventProjection.eventType); | ||||||
|
||||||
if (eventProjection.projectedName) { | ||||||
projectionDictionary[kMPFRProjectionName] = eventProjection.projectedName; | ||||||
} | ||||||
|
||||||
[projections addObject:projectionDictionary]; | ||||||
} | ||||||
|
||||||
[projections addObject:projectionDictionary]; | ||||||
} | ||||||
|
||||||
_dataDictionary[kMPFRProjections] = projections; | ||||||
|
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 anMPEvent
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