Good afternoon -

I've noticed that, on the iPhone, when I launch my PWS site from the
homescreen, using the previously created icon (thank you!) - the websocket
doesn't "reconnect" if you switch away and go back after a while. Doing
some research, it seems that at some point, Apple modified homescreen
launched apps to "save state" - which ... doesn't re-execute any JS
automatically, seemingly. I did find a pattern to work around this here
https://stackoverflow.com/a/56944455 and I've locally applied this on the
version I'm running (I don't think I'm on the beta?). I basically did a
minor refactor of the code that's tied to click/restart-interval, and used
that to tie to the visibilitychanged event that seems to get triggered.

Limited testing seems to indicate that this works. Any concerns with me
pushing up a PR for this? Anything else I should be aware of?

Thanks!

Brice Ruth, FCD
Software Engineer, Madison WI

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/CAFbExW7mekhNU9OB6hvh6fDB9aUjpzvhqL1J5ouyUApjpOFhPw%40mail.gmail.com.

Reply via email to