chore: update docs

pull/1761/head
Lucas Nogueira 9 months ago
parent 64a6240f79
commit 949e2d6c45
No known key found for this signature in database
GPG Key ID: FFEA6C72E73482F1

@ -1,5 +1,6 @@
---
"deep-link": patch
"deep-link-js": patch
---
Implement `get_current` on Linux and Windows.

@ -14,7 +14,9 @@ import { type UnlistenFn, listen } from '@tauri-apps/api/event'
* const urls = await getCurrent();
* ```
*
* #### - **Windows / Linux**: Unsupported.
* #### - **Windows / Linux**: This function reads the command line arguments and checks if there's only one value, which must be an URL with scheme matching one of the configured values.
* Note that you must manually check the arguments when registering deep link schemes dynamically with [`Self::register`].
* Additionally, the deep link might have been provided as a CLI argument so you should check if its format matches what you expect..
*
* @since 2.0.0
*/

@ -108,6 +108,12 @@ mod imp {
impl<R: Runtime> DeepLink<R> {
/// Get the current URLs that triggered the deep link. Use this on app load to check whether your app was started via a deep link.
///
/// ## Platform-specific:
///
/// - **Windows / Linux**: This function reads the command line arguments and checks if there's only one value, which must be an URL with scheme matching one of the configured values.
/// Note that you must manually check the arguments when registering deep link schemes dynamically with [`Self::register`].
/// Additionally, the deep link might have been provided as a CLI argument so you should check if its format matches what you expect.
pub fn get_current(&self) -> crate::Result<Option<Vec<url::Url>>> {
self.0
.run_mobile_plugin::<GetCurrentResponse>("getCurrent", ())

Loading…
Cancel
Save