Piwigo / piwigo-flutter-app

Piwigo mobile application for Android
GNU General Public License v2.0
83 stars 26 forks source link

Fixes paging on initial load of favorites view #173

Closed abrenoch closed 3 months ago

abrenoch commented 8 months ago

I noticed the first load of the favorites view did not load more content once the bottom had been reached. Pulling to refresh however did result in the paging working afterwards.

The problem would arise from _nbImages not having been set at the time it needs - which is why the subsequent reloads work. It looks like this may be getting assigned in _buildImageGrid but that is outside of a setState call so I'm not sure that is completely working there.

Anyway, this adds a .then after the fetchFavorites future (in initState) - inside _nbImages and _imageList are being updated inside a setState call.

Seems to have things working as expected again!

remi-martin commented 3 months ago

Included in #124