[FIXED] Your games page not refreshing on phone

On mobile, when I wake my screen or open browser whith the page loaded (android chrome), the games list does not refresh despite the PYDT spinning logo going through its animation.

I do wait a short time to see if the page updates after that but curiosity gets me and I do it manually. Sure enough, the welcome red titles appear.

My guess is that @Zamalekite would confirm this and would like it fixed too?

yeah I also have to force a refresh to get the latest update on turns

OK, I added a pretty simple hack to the your games page to refresh when the browser reports it’s become “visible” (tab opened, phone wakes up). I also added a refresh button. I don’t want to get too fancy here because one of the next things on my list is to rewrite how the server tells the client (and possibly website) that a new turn is available.

the refresh only seems to be working if you have the browser open already and you wake the screen.

If the page is set in a tab and I open chrome (that had been closed) on android, it brings that page up but no refresh.

Also, sitting there with the page for 10 minutes doesn’t refresh either. have kept my phone awake

You should wait till you do the other planned work it seems.

thank you for having a look

I’ll have to look into the issue with opening chrome vs switching to it, not sure why that’d be an issue because it should “load” the page there and trigger the API call.

And yeah, the list won’t update if a new turn is available because that would require the new websockets code and I didn’t implement auto refresh. I could do the auto refresh if it’d be helpful, but I’m just curious what your use case is here? Do you have the web push notifications enabled?