commons-app / apps-android-commons

The Wikimedia Commons Android app allows users to upload pictures from their Android phone/tablet to Wikimedia Commons
https://commons-app.github.io/
Apache License 2.0
988 stars 1.18k forks source link

Paginated data requests should be done with standard/recent pagination library #3462

Open macgills opened 4 years ago

macgills commented 4 years ago

The Pagination library offers a way to handle the complex process of paging through a remote/local dataset in an efficient and user friendly manner.

nicolas-raoul commented 4 years ago

Our pagination is really buggy, actually, especially the gallery (one's own uploads) :-'(

macgills commented 4 years ago

It is a quite difficult problem. The pagination library isn't the friendliest of things to use but it works. Another problem might be the usage of ListViews, I think I have seen 1 GridAdapter floating around that should also be replaced with Recyclerview and an appropriate LayoutManager+Adapter

macgills commented 4 years ago

(Un)fortunately google have now released Paging3 (in alpha) which is a much improved version of the paging library, this ticket should probably become migrate to Paging3 as the older library has been used in a few locations thus far. Could be a nice point to get some coroutines in as the library is very much designed with them in mind but that is neither here nor there.