fix: ping window after virtualdom is ready

This commit is contained in:
Jonathan Kelley committed 2022-02-19 17:34:44 -05:00
1 parent 93b4f745af
commit 28716248c5
4 files changed
+32 -1

No files matched your search

+3
View File
@@ -57,6 +57,9 @@ impl DesktopController {
.unwrap()
.push_front(serde_json::to_string(&edits.edits).unwrap());
// Make sure the window is ready for any new updates
proxy.send_event(UserWindowEvent::Update).unwrap();
loop {
dom.wait_for_work().await;
let mut muts = dom.work_with_deadline(|| false);
-1
View File
@@ -143,7 +143,6 @@ pub fn launch_with_props<P: 'static + Send>(
.send_event(user_window_events::UserWindowEvent::Update);
}
"browser_open" => {
println!("browser_open");
let data = message.params();
log::trace!("Open browser: {:?}", data);
if let Some(temp) = data.as_object() {
@@ -3,6 +3,7 @@ use wry::application::window::Fullscreen as WryFullscreen;
use crate::controller::DesktopController;
#[derive(Debug)]
pub(crate) enum UserWindowEvent {
Update,