sojourn-13 / sojourn-station

Other
48 stars 252 forks source link

Make nano wait till the UI loads to send updates #5471

Closed ShadowLarkens closed 1 week ago

ShadowLarkens commented 2 weeks ago

About The Pull Request

So, I had a hunch, and commented out user << output(list2params(list(strip_improper(json_encode(send_data)))),"[window_id].browser:receiveUpdateData") completely... and what do you know? Never got a white screen error no matter how hard I pressed it.

So, the problem with Nano has been this entire time, that it ends up pushing data before everything has loaded, causing an alert that then stops the rest of the UI from loading.

To fix this, I just took a note from TGUI - Nano now will not push updates to a UI until the UI signals via /Topic that it's loaded and ready.

With this change, I haven't experienced a single white screen from Nano. This might not fix it all, but holy shit it should improve reliability.

Changelog

:cl: fix: NanoUI now waits until it's loaded to send data, hopefully completely eliminating whitescreen problems. /:cl: