Skip to content
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

Added method getLogArray to obtain an array of ReleaseItem. #12

Closed
wants to merge 1 commit into from
Closed

Conversation

Sloy
Copy link
Contributor

@Sloy Sloy commented Nov 11, 2013

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 :)

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.
@cketti
Copy link
Owner

cketti commented Nov 20, 2013

Thanks for your contribution!

However, I ended up modifying the code I wrote for the fdroid branch to also cover your use case: 87dfa56
You can get a list of ReleaseItems by calling getChangeLog().

I'm planning to release a new version (1.2.0) containing these changes in a few days.

@cketti cketti closed this Nov 20, 2013
@Sloy
Copy link
Contributor Author

Sloy commented Nov 20, 2013

All right, no problem ;)
I'll keep using my modified version, and will update once the new version comes out. Thanks anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants