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

This commit is contained in:
Lucas Nogueira
2022-02-05 14:55:28 -03:00
parent 1805d05867
commit a017fbc71d
2 changed files with 1 additions and 5 deletions

View File

@@ -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"]

View File

@@ -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!();