mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-13 03:28:03 +00:00
fix: uni links failed to be invoked with --cm running on macOS
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
|
||||
@@ -31,6 +32,9 @@ int? kWindowId;
|
||||
WindowType? kWindowType;
|
||||
late List<String> kBootArgs;
|
||||
|
||||
/// Uni links.
|
||||
StreamSubscription? _uniLinkSubscription;
|
||||
|
||||
Future<void> main(List<String> args) async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
debugPrint("launch args: $args");
|
||||
@@ -203,7 +207,7 @@ void runMultiWindow(
|
||||
await restoreWindowPosition(WindowType.PortForward, windowId: kWindowId!);
|
||||
break;
|
||||
default:
|
||||
// no such appType
|
||||
// no such appType
|
||||
exit(0);
|
||||
}
|
||||
// show window from hidden status
|
||||
@@ -222,6 +226,8 @@ void runConnectionManagerScreen(bool hide) async {
|
||||
} else {
|
||||
showCmWindow();
|
||||
}
|
||||
// Start the uni links handler and redirect links to Native, not for Flutter.
|
||||
_uniLinkSubscription = listenUniLinks(handleByFlutter: false);
|
||||
}
|
||||
|
||||
void showCmWindow() {
|
||||
|
||||
Reference in New Issue
Block a user