Pagination in StarWars API
alirezaeiii opened this issue ยท 2 comments
You made a nice sample using MVI. The Search history feature is quite interesting. Thank you for that, But as far as I know StarWars API supports pagination. Did you use Paging library to display search items?
You made a nice sample using MVI. The Search history feature is quite interesting. Thank you for that, But as far as I know StarWars API supports pagination. Did you use Paging library to display search items?
Hi, thank you ๐๐พ.
I didn't implement the lazy loading pagination like the paging library does.
I recursively pull the data from the api if a next page is available.
https://github.com/Ezike/StarWarsSearch-MVI/blob/main/lib_character_search/src/main/java/com/ezike/tobenna/starwarssearch/lib_character_search/remote/impl/SearchRemoteImpl.kt
Yea it doesn't scale but it was sorta fun ๐ธ
Considering that StarWars API does not need to load many items and it is always limited to a few characters, I agree that you had a nice idea here. Thank you for sharing.