Adam Hurwitz
1 min readSep 3, 2018

--

When invalidate() is called here this will update the entire DataSource causing the PagedList to reload. Have you figured out a way to only reload the specific cell in the PagedList?

I have built a custom Firestore based DataSource. The only way to load a portion of the data without invalidating all of the data and having the UI flash / reload seems to be via integrating with Google’s Room ORM library. Unfortunately, this will cache my data twice, once with Firestore, and again with Room which is unnecessary, but better than reloading the entire PagedList.

See the documentation under Consider How Content Updates Work: If you’re loading data directly from a Room database updates get pushed to your app’s UI automatically.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Adam Hurwitz
Adam Hurwitz

Written by Adam Hurwitz

An account about nothing | Researcher and product consultant

No responses yet

What are your thoughts?