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-16266] exposed sections #5306
Conversation
@@ -33,7 +33,6 @@ | |||
TiC.PROPERTY_FOOTER_TITLE, | |||
TiC.PROPERTY_DEFAULT_ITEM_TEMPLATE, | |||
TiC.PROPERTY_SHOW_VERTICAL_SCROLL_INDICATOR, | |||
TiC.PROPERTY_SECTIONS, |
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.
If you remove this, when user calls listview.sections = ... , propertyChanged() wont get called, thus nothing will happen. What you should do instead is go to individual methods like 'appendSection' and update the 'sections' property in Javascript.
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 can set the Javascript object via Java by calling proxy.setProperty. I.e: proxy.setProperty('sections', mySection).
Code reviewed. Please address comments |
Addressed comments |
Whohoo! \o/ |
setProperty(TiC.PROPERTY_SECTIONS, getSections()); | ||
} | ||
|
||
private ListSectionProxy[] getSections() |
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.
Make this public with the following annotations
@Kroll.method @Kroll.getProperty
Then you do not need to call setProperty all over the place
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.
I will change
Code Reviewed. Please address comments |
Addressed review comments |
Code Reviewed. ACCEPTED |
Functional Passed. APPROVED |
[TIMOB-16266] exposed sections
Awesome. When the next version is out I’ll be able to cut away a lot of code! (by now I’m keeping the section indexes in an object 😒 ) |
[TIMOB-16266] exposed sections
Exposed sections as a property and method.
https://jira.appcelerator.org/browse/TIMOB-16266