https://kotlinlang.org logo
Title
k

keochris

12/17/2020, 5:31 PM
I have a fonction that builds a data class out of a JSON response from an API. Until then, that is fine. But when I have pagination, I don’t know how to generate a unique data class from the different pages. Can we “merge” 2 data classes? I’ll probably end up handling a list of Data Classes (which will impact a lot the rest of the code) but if anyone has an elegant idea ... 🙂
r

Ryan

12/17/2020, 6:45 PM
probably best to make everything pageable and when its not just say there is only 1 page
k

keochris

12/17/2020, 7:33 PM
I guess you are right.. It’s always disappointing to learn about something as impactful as pagination so late in a project... Thank you.