mirror of
https://github.com/jamesstringer90/appsandbox.git
synced 2026-10-22 02:52:49 -05:00
Flush queued WebView2 messages once the UI is ready (L1)
ui.c: on the uiReady action, call webview2_flush_queue() so messages posted before the JS message listener registered (e.g. early ui_log lines) are delivered instead of silently dropped.
This commit is contained in:
1 parent
b9629afe7f
commit
14daec375e
1 file changed
+3
@@ -869,6 +869,9 @@ static void on_webview2_message(const wchar_t *json)
|
||||
return;
|
||||
|
||||
if (wcscmp(action, L"uiReady") == 0) {
|
||||
/* JS has loaded and registered its message listener; deliver any
|
||||
* messages queued before WebView2 was ready (e.g. early ui_log lines). */
|
||||
webview2_flush_queue();
|
||||
if (!prereq_check_all()) {
|
||||
webview2_post(L"{\"type\":\"prereqRequired\"}");
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user