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
[TIMOB-18500] Android: event.cancel not set properly for optionsDialog #9476
Conversation
Update TiUIDialog.java
Tests:
Generated by 🚫 dangerJS |
} | ||
data.put(TiC.EVENT_PROPERTY_INDEX, id); | ||
data.put(TiC.PROPERTY_CANCEL, id == cancelIndex); | ||
fireEvent(TiC.EVENT_CLICK, data); |
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.
Could do this to prevent duplicate code:
boolean isCancel = id == cancelIndex;
...
data.put(TiC.PROPERTY_CANCEL, isCancel);
if (isCancel) {
fireEvent(TiC.EVENT_CANCEL, data);
} else {
fireEvent(TiC.EVENT_CLICK, data);
}
Also, remember to put the ticket number in the title of the PR and the commit message. 👍 |
Changed fix-version from 6.3.0 to 7.0.0. Please do a backport to 6_3_X once this PR is approved and label that with 6.3.0, so we have all versions aligned. Thanks! |
FR Passed. Right Studio Ver: 4.10.0.201709271713 |
@maggieaxway , can you please take a look at the unit test failures so that merge can be enabled. |
@lokeshchdhry @eric34 , I'm closing tickets, and noticed that there's no CR approval for this PR. |
@garymathews would you be able to do a CR? |
Update TiUIDialog.java
JIRA: https://jira.appcelerator.org/browse/TIMOB-18500
To test by clicking every option and button. Click outside dialog or back for cancel.
Test case: