win_fix_multi_tab: win clipboard refactor

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2022-10-27 10:56:14 +08:00
parent 702c81cafe
commit db99eccbe0
10 changed files with 66 additions and 27 deletions

View File

@@ -43,7 +43,7 @@ class _FileManagerTabPageState extends State<FileManagerTabPage> {
void initState() {
super.initState();
tabController.onRemove = (_, id) => onRemoveId(id);
tabController.onRemoved = (_, id) => onRemoveId(id);
rustDeskWinManager.setMethodHandler((call, fromWindowId) async {
print(

View File

@@ -46,7 +46,7 @@ class _PortForwardTabPageState extends State<PortForwardTabPage> {
void initState() {
super.initState();
tabController.onRemove = (_, id) => onRemoveId(id);
tabController.onRemoved = (_, id) => onRemoveId(id);
rustDeskWinManager.setMethodHandler((call, fromWindowId) async {
debugPrint(

View File

@@ -59,11 +59,12 @@ class _ConnectionTabPageState extends State<ConnectionTabPage> {
void initState() {
super.initState();
tabController.onRemove = (_, id) => onRemoveId(id);
tabController.onRemoved = (_, id) => onRemoveId(id);
tabController.onSelected = (_, id) => onSelectId(id);
rustDeskWinManager.setMethodHandler((call, fromWindowId) async {
print(
"call ${call.method} with args ${call.arguments} from window ${fromWindowId}");
"call ${call.method} with args ${call.arguments} from window $fromWindowId");
final RxBool fullscreen = Get.find(tag: 'fullscreen');
// for simplify, just replace connectionId
@@ -174,6 +175,10 @@ class _ConnectionTabPageState extends State<ConnectionTabPage> {
_update_remote_count();
}
void onSelectId(String id) {
bind.setCurSessionId(id: id);
}
int windowId() {
return widget.params["windowId"];
}

View File

@@ -30,7 +30,7 @@ class _DesktopServerPageState extends State<DesktopServerPage>
void initState() {
gFFI.ffiModel.updateEventListener("");
windowManager.addListener(this);
tabController.onRemove = (_, id) => onRemoveId(id);
tabController.onRemoved = (_, id) => onRemoveId(id);
super.initState();
}
@@ -99,7 +99,7 @@ class ConnectionManagerState extends State<ConnectionManager> {
@override
void initState() {
gFFI.serverModel.updateClientState();
gFFI.serverModel.tabController.onSelected = (index) =>
gFFI.serverModel.tabController.onSelected = (index, _) =>
gFFI.chatModel.changeCurrentID(gFFI.serverModel.clients[index].id);
super.initState();
}