From beb14f90b93afee908c8dd612f37e0d9b9957cbc Mon Sep 17 00:00:00 2001 From: 21pages Date: Fri, 7 Jul 2023 18:35:15 +0800 Subject: [PATCH] add missing uri pattern: rustdesk:// Signed-off-by: 21pages --- flutter/lib/common.dart | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/flutter/lib/common.dart b/flutter/lib/common.dart index 65bdc00f46c7..a4e46e9bd36a 100644 --- a/flutter/lib/common.dart +++ b/flutter/lib/common.dart @@ -1593,6 +1593,7 @@ bool handleUriLink({List? cmdArgs, Uri? uri, String? uriString}) { List? args; if (cmdArgs != null) { args = cmdArgs; + // rustdesk if (args.isNotEmpty && args[0].startsWith(kUniLinksPrefix)) { final uri = Uri.tryParse(args[0]); if (uri != null) { @@ -1701,6 +1702,10 @@ List? urlLinkToCmdArgs(Uri uri) { if (uri.path.length > 1) { id = uri.path.substring(1); } + } else if (uri.authority.length > 2 && uri.path.length <= 1) { + // rustdesk:// + command = '--connect'; + id = uri.authority; } List args = List.empty(growable: true);