https://kotlinlang.org logo
#android-architecture
Title
# android-architecture
u

ursus

05/20/2019, 8:15 AM
Paginating the changes is probably stupid since you need it all
s

sngrekov

05/20/2019, 8:32 AM
We do user needs all fresh data? You can fetch only last portion of it, and then sync it lazily while user scrolls up to history of chat
u

ursus

05/20/2019, 8:35 AM
Hm, how would I know when im done? if I were to sync lazily based on current index shown on screen, i.e the page it belongs to
s

sngrekov

05/20/2019, 10:25 AM
When user came back, you can call server with request smth like "give me last page for this chat" and then compare it with local data for this chat. Then you will have a gap between old data and new one, and sync it lazily until this gap is filled
4 Views