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]]
|
[[package]]
|
||||||
name = "dioxus-cli"
|
name = "dioxus-cli"
|
||||||
version = "0.5.0"
|
version = "0.5.4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"atty",
|
"atty",
|
||||||
|
|||||||
@@ -182,11 +182,15 @@ impl<Cfg: Default + 'static, ContextFn: ?Sized> LaunchBuilder<Cfg, ContextFn> {
|
|||||||
/// - `liveview`
|
/// - `liveview`
|
||||||
mod current_platform {
|
mod current_platform {
|
||||||
macro_rules! if_else_cfg {
|
macro_rules! if_else_cfg {
|
||||||
(if $attr:meta { $then:item } else { $else:item }) => {
|
(if $attr:meta { $($then:item)* } else { $($else:item)* }) => {
|
||||||
#[cfg($attr)]
|
$(
|
||||||
$then
|
#[cfg($attr)]
|
||||||
#[cfg(not($attr))]
|
$then
|
||||||
$else
|
)*
|
||||||
|
$(
|
||||||
|
#[cfg(not($attr))]
|
||||||
|
$else
|
||||||
|
)*
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
use crate::prelude::TryIntoConfig;
|
use crate::prelude::TryIntoConfig;
|
||||||
@@ -194,7 +198,10 @@ mod current_platform {
|
|||||||
#[cfg(any(feature = "desktop", feature = "mobile"))]
|
#[cfg(any(feature = "desktop", feature = "mobile"))]
|
||||||
if_else_cfg! {
|
if_else_cfg! {
|
||||||
if not(feature = "fullstack") {
|
if not(feature = "fullstack") {
|
||||||
|
#[cfg(feature = "desktop")]
|
||||||
pub use dioxus_desktop::launch::*;
|
pub use dioxus_desktop::launch::*;
|
||||||
|
#[cfg(not(feature = "desktop"))]
|
||||||
|
pub use dioxus_mobile::launch::*;
|
||||||
} else {
|
} else {
|
||||||
impl TryIntoConfig<crate::launch::current_platform::Config> for ::dioxus_desktop::Config {
|
impl TryIntoConfig<crate::launch::current_platform::Config> for ::dioxus_desktop::Config {
|
||||||
fn into_config(self) -> Option<crate::launch::current_platform::Config> {
|
fn into_config(self) -> Option<crate::launch::current_platform::Config> {
|
||||||
|
|||||||
Reference in new issue
Block a user