Fix the mobile feature on the dioxus crate (#2185)
This commit is contained in:
1 parent
d16ac4e736
commit
4a622348f2
2 files changed
+13
-6
No files matched your search
Generated
+1
-1
@@ -2143,7 +2143,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "dioxus-cli"
|
||||
version = "0.5.0"
|
||||
version = "0.5.4"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"atty",
|
||||
|
||||
@@ -182,11 +182,15 @@ impl<Cfg: Default + 'static, ContextFn: ?Sized> LaunchBuilder<Cfg, ContextFn> {
|
||||
/// - `liveview`
|
||||
mod current_platform {
|
||||
macro_rules! if_else_cfg {
|
||||
(if $attr:meta { $then:item } else { $else:item }) => {
|
||||
#[cfg($attr)]
|
||||
$then
|
||||
#[cfg(not($attr))]
|
||||
$else
|
||||
(if $attr:meta { $($then:item)* } else { $($else:item)* }) => {
|
||||
$(
|
||||
#[cfg($attr)]
|
||||
$then
|
||||
)*
|
||||
$(
|
||||
#[cfg(not($attr))]
|
||||
$else
|
||||
)*
|
||||
};
|
||||
}
|
||||
use crate::prelude::TryIntoConfig;
|
||||
@@ -194,7 +198,10 @@ mod current_platform {
|
||||
#[cfg(any(feature = "desktop", feature = "mobile"))]
|
||||
if_else_cfg! {
|
||||
if not(feature = "fullstack") {
|
||||
#[cfg(feature = "desktop")]
|
||||
pub use dioxus_desktop::launch::*;
|
||||
#[cfg(not(feature = "desktop"))]
|
||||
pub use dioxus_mobile::launch::*;
|
||||
} else {
|
||||
impl TryIntoConfig<crate::launch::current_platform::Config> for ::dioxus_desktop::Config {
|
||||
fn into_config(self) -> Option<crate::launch::current_platform::Config> {
|
||||
|
||||
Reference in new issue
Block a user