Skip to content

Commit

Permalink
Merge pull request rustdesk#4902 from 21pages/urilink
Browse files Browse the repository at this point in the history
add missing uri pattern
  • Loading branch information
rustdesk authored Jul 7, 2023
2 parents daa59af + beb14f9 commit 54d03b2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions flutter/lib/common.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1593,6 +1593,7 @@ bool handleUriLink({List<String>? cmdArgs, Uri? uri, String? uriString}) {
List<String>? args;
if (cmdArgs != null) {
args = cmdArgs;
// rustdesk <uri link>
if (args.isNotEmpty && args[0].startsWith(kUniLinksPrefix)) {
final uri = Uri.tryParse(args[0]);
if (uri != null) {
Expand Down Expand Up @@ -1701,6 +1702,10 @@ List<String>? urlLinkToCmdArgs(Uri uri) {
if (uri.path.length > 1) {
id = uri.path.substring(1);
}
} else if (uri.authority.length > 2 && uri.path.length <= 1) {
// rustdesk://<connect-id>
command = '--connect';
id = uri.authority;
}

List<String> args = List.empty(growable: true);
Expand Down

0 comments on commit 54d03b2

Please sign in to comment.