Piwigo / Piwigo-Android

Piwigo Native Android App
GNU General Public License v3.0
140 stars 43 forks source link

only 100 photos shown #144

Closed ramack closed 4 years ago

ramack commented 5 years ago

Describe the bug and how to reproduce If an album contains more than 100 photos, only the first 100 are shown. Applies to the list and the fullscreen photoviewer. Maybe it some form of paging from the server?

Expected behavior Show all photos.

ramack commented 5 years ago

@voriondev can you check with @plegall whether there is paging implemented in the REST api and if so how it exactly works?

EddyLB commented 5 years ago

When you call the method pwg.categories.getImages to retrieve the images belonging to a category, you provide the page and the number of images per_page you wish. By default, page = 0 and per_page = 100. For information, the iOS app calls this method with per_page set to get the amount of images which can be displayed on the screen of the device. It then calls again the method with an increasing page value when the user scrolls the image collection. The thumbnails are downloaded in the background and appear on the screen as soon as they arrive.

ramack commented 5 years ago

thanks EddyLB, this seems to be the explanation. We don't provide anything and therfore getting the default.

I think this has to be changed such that we can show more than 100 photos. The approach in iOS seems to correct one, but it is a bit of effort. @voriondev can you take a look?

Valou447 commented 5 years ago

The iOS behavior is very optimized and would be great to implement on the Android App.

Therefore this needs more than just a bit of effort, so I'd suggest shifting this to another milestone.

ramack commented 5 years ago

Yes and no. I think we should split it. This release we enable showing all photos, later we optimize.

Valou447 commented 5 years ago

How could we enable showing all photos without any lazy load solution ?

Just imagine if somebody has an album with 1000+ photos, the app would just freeze (and the server too, because each loaded thumbnail is an HTTP REQUEST..

ramack commented 5 years ago

Good point. Already 100 is quite slow. So is 100 the good threshold? Shall we make it configurable? Or just set it to 200 for now? - I don't know what is bet. We can also document that only 100 photos are shown... but that doesn't sound nice in the release notes

ramack commented 5 years ago

anyhow, as we don't have a good idea or solution to this, let's move it to 1.1.0

ramack commented 4 years ago

I'll take care of this during #21

anoff commented 4 years ago

don't want to gravedig this issue but I am really looking forward to this being fixed. What are you folks planning to do with release 1.1.0. It's past the planned date - can you give an estimate on time remaining?