digitalfabrik / integreat-app

React JS and React Native App for Integreat
https://integreat.app
MIT License
46 stars 15 forks source link

Background app refresh not happening #2897

Open LeandraH opened 1 month ago

LeandraH commented 1 month ago

Describe the Bug

Report from Sascha on Mattermost:

He opened the mobile app for the first time in a while. It's usually on Stadt Augsburg (and also in this case). The nav bar at the top didn't show the map option even though that had been enabled a while ago. After a pull-to-refresh, the map route showed up. On an iPhone 12 Pro Max with iOS 17.5.1, connected to the live CMS

The app should have checked if the last update was more than a day ago, seen that it was indeed more than a day ago, and then updated the data.

Steps to Reproduce

  1. Change one of the feature flags for 'Testumgebung' deciding which routes are possible
  2. Wait more than a day
  3. Open the native app
  4. See that the routes haven't updated

Note: I haven't actually tested this. Presumably, one can change the period for checking the last update.

Expected Behavior

The available routes in the nav bar have updated.

Actual Behavior

The available routes in the nav bar haven't updated.

Additional Information

Thread in Mattermost:

https://chat.tuerantuer.org/digitalfabrik/pl/tcwqhkhmjpn9djpjjbmn97kqfc

LeandraH commented 3 weeks ago

First things I found: The function useLoadCities that checks what feature flags are enabled doesn't get called repeatedly like useLoadCityContent and useLoadWithCache. I haven't gotten around to putting it in yet; I also haven't checked yet if the other two hooks do work in the background.