refact, separate remote window, save session position

Signed-off-by: dignow <linlong1265@gmail.com>
This commit is contained in:
dignow
2023-08-02 22:02:18 +08:00
parent 773a74e2a9
commit 688ecef4cc
6 changed files with 60 additions and 5 deletions

View File

@@ -131,11 +131,22 @@ class _ConnectionTabPageState extends State<ConnectionTabPage> {
windowOnTop(windowId());
}
return jumpOk;
} else if (call.method == kWindowEventGetRemoteList) {
return tabController.state.value.tabs
.map((e) => e.key)
.toList()
.join(',');
}
_update_remote_count();
});
Future.delayed(Duration.zero, () {
restoreWindowPosition(WindowType.RemoteDesktop, windowId: windowId());
restoreWindowPosition(
WindowType.RemoteDesktop,
windowId: windowId(),
peerId: tabController.state.value.tabs.isEmpty
? null
: tabController.state.value.tabs[0].key,
);
});
}