fix(deep-link): allow empty config values (#1732)

pull/1728/head^2
Lucas Fernandes Nogueira 9 months ago committed by GitHub
parent feb1e93fcb
commit 4654591d82
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,5 @@
---
"deep-link": patch
---
Allow empty configuration values.

@ -32,10 +32,12 @@ where
#[derive(Deserialize)]
pub struct Config {
/// Mobile requires `https://<host>` urls.
#[serde(default)]
pub mobile: Vec<AssociatedDomain>,
/// Desktop requires urls starting with `<scheme>://`.
/// These urls are also active in dev mode on Android.
#[allow(unused)] // Used in tauri-bundler
#[serde(default)]
pub desktop: DesktopProtocol,
}
@ -46,3 +48,9 @@ pub enum DesktopProtocol {
One(DeepLinkProtocol),
List(Vec<DeepLinkProtocol>),
}
impl Default for DesktopProtocol {
fn default() -> Self {
Self::List(Vec::new())
}
}

Loading…
Cancel
Save