Fix: update wry, tao, to fix android issues

This commit is contained in:
Jonathan Kelley committed 2024-03-15 20:12:13 -07:00
1 parent ef288d02d7
commit f9f902732b
9 files changed
+1169 -371

No files matched your search

+18 -3
View File
@@ -81,7 +81,12 @@ impl App {
app.set_global_hotkey_handler();
// Allow hotreloading to work - but only in debug mode
#[cfg(all(feature = "hot-reload", debug_assertions))]
#[cfg(all(
feature = "hot-reload",
debug_assertions,
not(target_os = "android"),
not(target_os = "ios")
))]
app.connect_hotreload();
(event_loop, app)
@@ -99,7 +104,12 @@ impl App {
self.shared.shortcut_manager.call_handlers(event);
}
#[cfg(all(feature = "hot-reload", debug_assertions))]
#[cfg(all(
feature = "hot-reload",
debug_assertions,
not(target_os = "android"),
not(target_os = "ios")
))]
pub fn connect_hotreload(&self) {
dioxus_hot_reload::connect({
let proxy = self.shared.proxy.clone();
@@ -265,7 +275,12 @@ impl App {
view.desktop_context.send_edits();
}
#[cfg(all(feature = "hot-reload", debug_assertions))]
#[cfg(all(
feature = "hot-reload",
debug_assertions,
not(target_os = "android"),
not(target_os = "ios")
))]
pub fn handle_hot_reload_msg(&mut self, msg: dioxus_hot_reload::HotReloadMsg) {
match msg {
dioxus_hot_reload::HotReloadMsg::UpdateTemplate(template) => {
+6 -1
View File
@@ -14,7 +14,12 @@ pub enum UserWindowEvent {
Ipc { id: WindowId, msg: IpcMessage },
/// Handle a hotreload event, basically telling us to update our templates
#[cfg(all(feature = "hot-reload", debug_assertions))]
#[cfg(all(
feature = "hot-reload",
debug_assertions,
not(target_os = "android"),
not(target_os = "ios")
))]
HotReloadEvent(dioxus_hot_reload::HotReloadMsg),
/// Create a new window
+6 -1
View File
@@ -36,7 +36,12 @@ pub fn launch_virtual_dom_blocking(virtual_dom: VirtualDom, desktop_config: Conf
#[cfg(any(target_os = "windows", target_os = "linux", target_os = "macos"))]
UserWindowEvent::GlobalHotKeyEvent(evnt) => app.handle_global_hotkey(evnt),
#[cfg(all(feature = "hot-reload", debug_assertions))]
#[cfg(all(
feature = "hot-reload",
debug_assertions,
not(target_os = "android"),
not(target_os = "ios")
))]
UserWindowEvent::HotReloadEvent(msg) => app.handle_hot_reload_msg(msg),
UserWindowEvent::Ipc { id, msg } => match msg.method() {
+1
View File
@@ -221,6 +221,7 @@ impl WebviewInstance {
}
}
#[allow(unused)]
pub fn kick_stylsheets(&self) {
// run eval in the webview to kick the stylesheets by appending a query string
// we should do something less clunky than this