switch sides: windows

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2023-01-17 21:43:39 +08:00
parent e57949d472
commit c25796e44d
5 changed files with 27 additions and 24 deletions

View File

@@ -1307,8 +1307,10 @@ bool callUniLinksUriHandler(Uri uri) {
// new connection
if (uri.authority == "connection" && uri.path.startsWith("/new/")) {
final peerId = uri.path.substring("/new/".length);
var param = uri.queryParameters;
String? switch_uuid = param["switch_uuid"];
Future.delayed(Duration.zero, () {
rustDeskWinManager.newRemoteDesktop(peerId);
rustDeskWinManager.newRemoteDesktop(peerId, switch_uuid: switch_uuid);
});
return true;
}

View File

@@ -199,12 +199,6 @@ class FfiModel with ChangeNotifier {
parent.target?.serverModel.setShowElevation(show);
} else if (name == 'cancel_msgbox') {
cancelMsgBox(evt, peerId);
} else if (name == 'switch_sides') {
final peer_id = evt['peer_id'].toString();
final uuid = evt['uuid'].toString();
Future.delayed(Duration.zero, () {
rustDeskWinManager.newRemoteDesktop(peer_id, switch_uuid: uuid);
});
} else if (name == 'switch_back') {
final peer_id = evt['peer_id'].toString();
await bind.sessionSwitchSides(id: peer_id);