feat: add rustdesk uni links protocol

This commit is contained in:
Kingtous
2022-10-12 21:57:19 +08:00
parent 3593fb0463
commit 2eab0d8832
4 changed files with 42 additions and 7 deletions

View File

@@ -178,8 +178,14 @@ class FfiModel with ChangeNotifier {
} else if (name == 'update_privacy_mode') {
updatePrivacyMode(evt, peerId);
} else if (name == 'new_connection') {
final remoteId = evt['peer_id'];
rustDeskWinManager.newRemoteDesktop(remoteId);
var arg = evt['peer_id'].toString();
if (arg.startsWith(kUniLinksPrefix)) {
parseRustdeskUri(arg);
} else {
Future.delayed(Duration.zero, () {
rustDeskWinManager.newRemoteDesktop(arg);
});
}
}
};
}