mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-18 01:41:30 +03:00
add file_transfer confirm close
This commit is contained in:
@@ -39,11 +39,7 @@ class _ConnectionTabPageState extends State<ConnectionTabPage> {
|
||||
label: peerId,
|
||||
selectedIcon: selectedIcon,
|
||||
unselectedIcon: unselectedIcon,
|
||||
onTabCloseButton: () {
|
||||
debugPrint("onTabCloseButton");
|
||||
tabController.jumpBy(peerId);
|
||||
clientClose(ffi(peerId).dialogManager);
|
||||
},
|
||||
onTabCloseButton: () => handleTabCloseButton(peerId),
|
||||
page: RemotePage(
|
||||
key: ValueKey(peerId),
|
||||
id: peerId,
|
||||
@@ -75,11 +71,7 @@ class _ConnectionTabPageState extends State<ConnectionTabPage> {
|
||||
label: id,
|
||||
selectedIcon: selectedIcon,
|
||||
unselectedIcon: unselectedIcon,
|
||||
onTabCloseButton: () {
|
||||
debugPrint("onTabCloseButton");
|
||||
tabController.jumpBy(id);
|
||||
clientClose(ffi(id).dialogManager);
|
||||
},
|
||||
onTabCloseButton: () => handleTabCloseButton(id),
|
||||
page: RemotePage(
|
||||
key: ValueKey(id),
|
||||
id: id,
|
||||
@@ -165,4 +157,14 @@ class _ConnectionTabPageState extends State<ConnectionTabPage> {
|
||||
int windowId() {
|
||||
return widget.params["windowId"];
|
||||
}
|
||||
|
||||
void handleTabCloseButton(String peerId) {
|
||||
final session = ffi(peerId);
|
||||
if (session.ffiModel.pi.hostname.isNotEmpty) {
|
||||
tabController.jumpBy(peerId);
|
||||
clientClose(session.dialogManager);
|
||||
} else {
|
||||
tabController.closeBy(peerId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user