Bladeren bron

fix(core): regression on dialog and updater feature flag usage

Lucas Nogueira 3 jaren geleden
bovenliggende
commit
a017fbc71d
2 gewijzigde bestanden met toevoegingen van 1 en 5 verwijderingen
  1. 1 1
      core/tauri/Cargo.toml
  2. 0 4
      core/tauri/src/api/dialog.rs

+ 1 - 1
core/tauri/Cargo.toml

@@ -111,7 +111,7 @@ compression = [ "tauri-macros/compression", "tauri-utils/compression" ]
 wry = ["tauri-runtime-wry"]
 isolation = ["tauri-utils/isolation", "tauri-macros/isolation"]
 custom-protocol = ["tauri-macros/custom-protocol"]
-updater = ["minisign-verify", "base64", "dialog-ask"]
+updater = ["minisign-verify", "base64", "http-api", "dialog-ask"]
 http-api = ["attohttpc"]
 reqwest-client = ["reqwest", "bytes"]
 command = ["shared_child", "os_pipe"]

+ 0 - 4
core/tauri/src/api/dialog.rs

@@ -49,11 +49,9 @@ macro_rules! file_dialog_builder {
     /// The file dialog builder.
     ///
     /// Constructs file picker dialogs that can select single/multiple files or directories.
-    #[cfg(any(dialog_open, dialog_save))]
     #[derive(Debug, Default)]
     pub struct FileDialogBuilder(rfd::FileDialog);
 
-    #[cfg(any(dialog_open, dialog_save))]
     impl FileDialogBuilder {
       /// Gets the default file dialog builder.
       pub fn new() -> Self {
@@ -107,7 +105,6 @@ macro_rules! file_dialog_builder {
 /// Examples of main thread context are the [`tauri::App::run`] closure and non-async commmands.
 pub mod blocking {
   use crate::{Runtime, Window};
-  #[cfg(any(dialog_open, dialog_save))]
   use std::path::{Path, PathBuf};
   use std::sync::mpsc::sync_channel;
 
@@ -282,7 +279,6 @@ pub mod blocking {
 
 mod nonblocking {
   use crate::{Runtime, Window};
-  #[cfg(any(dialog_open, dialog_save))]
   use std::path::{Path, PathBuf};
 
   file_dialog_builder!();