Put asset collection behind a feature flag

This commit is contained in:
Jonathan Kelley committed 2024-01-05 23:14:03 -08:00
1 parent 347351d1ee
commit 20135368b8
3 files changed
+13 -4

No files matched your search

+2 -2
View File
@@ -82,6 +82,8 @@ impl<P: 'static> App<P> {
};
// Copy over any assets we find
// todo - re-enable this when we have a faster way of copying assets
#[cfg(feature = "collect-assets")]
crate::collect_assets::copy_assets();
// Set the event converter
@@ -119,7 +121,6 @@ impl<P: 'static> App<P> {
});
}
//
pub fn handle_new_window(&mut self) {
for handler in self.shared.pending_webviews.borrow_mut().drain(..) {
let id = handler.desktop_context.window.id();
@@ -320,7 +321,6 @@ impl<P: 'static> App<P> {
let Some(view) = self.webviews.get_mut(&id) else {
return;
};
println!("poll_vdom");
view.poll_vdom();
}
+3 -1
View File
@@ -6,7 +6,6 @@
mod app;
mod assets;
mod cfg;
mod collect_assets;
mod desktop_context;
mod edits;
mod element;
@@ -23,6 +22,9 @@ mod shortcut;
mod waker;
mod webview;
#[cfg(feature = "collect-assets")]
mod collect_assets;
#[cfg(any(target_os = "ios", target_os = "android"))]
mod mobile_shortcut;