An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.
Rust androidanydeskdartflatpakflutterflutter-appsioslinuxmacosp2prdpremote-controlremote-desktoprustrust-langteamviewervncwaylandwindows
Fix new cm tab not replace the old persisted tab (#9127)
21pagesf34b8411a795
diff --git a/flutter/lib/desktop/widgets/tabbar_widget.dart b/flutter/lib/desktop/widgets/tabbar_widget.dartindex 0b48b3b92..75ecacbfe 100644--- a/flutter/lib/desktop/widgets/tabbar_widget.dart+++ b/flutter/lib/desktop/widgets/tabbar_widget.dart@@ -552,6 +552,13 @@ class _DesktopTabState extends State<DesktopTab>controller: state.value.pageController,physics: NeverScrollableScrollPhysics(),children: () {+ if (DesktopTabType.cm == tabType) {+ // Fix when adding a new tab still showing closed tabs with the same peer id, which would happen after the DesktopTab was stateful.+ return state.value.tabs.map((tab) {+ return tab.page;+ }).toList();+ }+/// to-do refactor, separate connection state and UI state for remote session./// [workaround] PageView children need an immutable list, after it has been passed into PageViewfinal tabLen = state.value.tabs.length;diff --git a/flutter/lib/models/server_model.dart b/flutter/lib/models/server_model.dartindex 613fee6ad..1d800ef69 100644--- a/flutter/lib/models/server_model.dart+++ b/flutter/lib/models/server_model.dart@@ -826,7 +826,7 @@ class Client {Map<String, dynamic> toJson() {final Map<String, dynamic> data = <String, dynamic>{};data['id'] = id;- data['is_start'] = authorized;+ data['authorized'] = authorized;data['is_file_transfer'] = isFileTransfer;data['port_forward'] = portForward;data['name'] = name;@@ -840,6 +840,8 @@ class Client {data['block_input'] = blockInput;data['disconnected'] = disconnected;data['from_switch'] = fromSwitch;+ data['in_voice_call'] = inVoiceCall;+ data['incoming_voice_call'] = incomingVoiceCall;return data;}