mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-24 09:46:59 -06:00
Merge pull request #3207 from Taha-Mahmoodi/chore/wasm-warnings-dup-check
Build: the wasm check is warning-free; one file-dialog check instead of two
This commit is contained in:
@@ -144,11 +144,7 @@ impl App {
|
||||
// again on its document when it answers.
|
||||
#[cfg(target_os = "macos")]
|
||||
if !self.app.file_dialog_open() {
|
||||
// Files from the Finder and the Dock wait while a file dialog is open: what asked for it runs
|
||||
// again on its document when it answers.
|
||||
if !self.app.file_dialog_open() {
|
||||
open_files(&mut self.app, open_documents::take());
|
||||
}
|
||||
open_files(&mut self.app, open_documents::take());
|
||||
}
|
||||
self.app.logic(ctx);
|
||||
window::track(ctx, &mut self.app.ui.window);
|
||||
|
||||
@@ -204,6 +204,7 @@ impl Session {
|
||||
}
|
||||
|
||||
/// Write the profile `name` (its file's `bytes`) to the store; `false` when it didn't go there.
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
pub(crate) fn store_profile(&self, name: &str, bytes: &[u8]) -> bool {
|
||||
self.profile_dir.as_deref().is_some_and(|dir| put(dir, &format!("{}.{PROFILE_EXT}", file_stem(name)), bytes))
|
||||
}
|
||||
|
||||
@@ -486,6 +486,7 @@ pub struct VectorcraftApp {
|
||||
/// the answer.
|
||||
font_check: Option<(std::sync::mpsc::Receiver<bool>, bool)>,
|
||||
/// When installed fonts were last checked in line (app time, s).
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
font_install_check_at: f64,
|
||||
/// Keyboard pastes of something other than text (see [`shortcuts::PasteChord`]).
|
||||
pub(crate) paste_chord: shortcuts::PasteChord,
|
||||
@@ -535,6 +536,7 @@ struct PendingScreenshot {
|
||||
/// Seconds between two looks at the system clipboard for [`VectorcraftApp::system_paste`].
|
||||
const SYSTEM_CLIPBOARD_POLL: f64 = 0.25;
|
||||
/// Seconds between looks for fonts a font manager activated while the app stays in front (#2576).
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
const FONT_INSTALL_POLL: f64 = 2.0;
|
||||
|
||||
impl VectorcraftApp {
|
||||
@@ -601,6 +603,7 @@ impl VectorcraftApp {
|
||||
picks: picks::Picks::default(),
|
||||
screen_sampler: None,
|
||||
font_check: None,
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
font_install_check_at: f64::NEG_INFINITY,
|
||||
paste_chord: Default::default(),
|
||||
background: Default::default(),
|
||||
|
||||
Reference in New Issue
Block a user