Skip to content

Refresh sections _before_ calling super.notifyDataSetChanged() #8

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

Closed
wants to merge 1 commit into from

Conversation

PeterMinin
Copy link
Contributor

I had an issue with my list not updating when I changed some data in an underlying array of my ArrayAdapter unless I called notifyDataSetChanged() twice. Calling refresh() before super.notifyDataSetChanged() seems like a logical fix.

@nolanlawson
Copy link
Owner

Hm, that's weird. So this commit fixed it so you only had to call it once?

@PeterMinin
Copy link
Contributor Author

That's right. More precisely, I started with an empty list and then added items to the underlying ArrayList. Before I swapped these lines the list would remain empty after notifyDataSetChanged(), now it gets populated as expected.

@nolanlawson
Copy link
Owner

Cool, will merge soon and then push out a new release. Thanks! 😃

@nolanlawson
Copy link
Owner

You're awesome. Merged!

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.

2 participants