Added method getLogArray to obtain an array of ReleaseItem. #12
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added a new public method, getLogArray(full), to obtain a SparseArray of ReleaseItem objects, having the versioncode as the key, and the ReleaseItem object as value, with the versionname, versioncode and list of changes.
The new method uses the same code than getLog(full) to parse the chagelogs and merge localized and default xmls. Now getLog reuses this new method to avoid code duplicates.
Modified class ReleaseItem to be public, and its properties encapsulated to be read-only.
I did this to be able to access the list of changes in my app, because I wanted to show a custom card in the main screen with the latest changes. And I thought it would be a good idea to provide a way of accessing the raw list of changes instead of the html, so the developer can put them in a customized way. I still show the dialog when the user selects to do so, but I don't like modal dialogs being shown directly when the user opens the app.
It's just an extra functionality to provide more flexibility, as I think this library is already great to manage list of changes on each new version. Hope you like it, merge if you find it useful :)