From bf7597ec7c15df9c448e5a75e9320ac7fb817ed8 Mon Sep 17 00:00:00 2001 From: Kingtous Date: Wed, 19 Oct 2022 09:54:04 +0800 Subject: [PATCH] feat: add window size plugin injection on windows --- flutter/lib/common.dart | 12 +++++++----- flutter/lib/main.dart | 1 - flutter/pubspec.yaml | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/flutter/lib/common.dart b/flutter/lib/common.dart index 12222727b..968ae34e8 100644 --- a/flutter/lib/common.dart +++ b/flutter/lib/common.dart @@ -1195,11 +1195,12 @@ Future initUniLinks() async { // check cold boot try { final initialLink = await getInitialLink(); - // TODO: parse link - print("${initialLink}"); - } on PlatformException { - // Handle exception by warning the user their action did not succeed - // return? + if (initialLink == null) { + return; + } + parseRustdeskUri(initialLink); + } catch (err) { + debugPrint("$err"); } } @@ -1257,6 +1258,7 @@ void parseRustdeskUri(String uriPath) { /// uri handler void callUniLinksUriHandler(Uri uri) { + debugPrint("uni links called: $uri"); // new connection if (uri.authority == "connection" && uri.path.startsWith("/new/")) { final peerId = uri.path.substring("/new/".length); diff --git a/flutter/lib/main.dart b/flutter/lib/main.dart index 0e3362a45..6f69a9c2b 100644 --- a/flutter/lib/main.dart +++ b/flutter/lib/main.dart @@ -198,7 +198,6 @@ void runPortForwardScreen(Map argument) async { } void runConnectionManagerScreen() async { - await initEnv(kAppTypeMain); await initEnv(kAppTypeMain); // initialize window WindowOptions windowOptions = diff --git a/flutter/pubspec.yaml b/flutter/pubspec.yaml index 8c1dc9815..da086aab1 100644 --- a/flutter/pubspec.yaml +++ b/flutter/pubspec.yaml @@ -64,7 +64,7 @@ dependencies: desktop_multi_window: git: url: https://github.com/Kingtous/rustdesk_desktop_multi_window - ref: f25487b8aacfcc9d22b86a84e97eda1a5c07ccaf + ref: 318ebd0a70cc5868911591c04f84bf1541f1bf4e freezed_annotation: ^2.0.3 tray_manager: git: