mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
Auto-close the tab where session is done
This commit is contained in:
@@ -71,6 +71,7 @@ class _SSHTabPageState extends State<SSHTabPage>
|
||||
if (confirm != true) {
|
||||
return;
|
||||
}
|
||||
// debugPrint("Removing a tab whose tabId = $e");
|
||||
_tabIds.remove(e);
|
||||
_refreshTabs();
|
||||
},
|
||||
@@ -104,6 +105,12 @@ class _SSHTabPageState extends State<SSHTabPage>
|
||||
key: key,
|
||||
spi: spi,
|
||||
pop: false,
|
||||
onSessionEnd: () {
|
||||
// debugPrint("Session done received on page whose tabId = $name");
|
||||
// debugPrint("key = $key");
|
||||
_tabIds.remove(name);
|
||||
_refreshTabs();
|
||||
},
|
||||
);
|
||||
_refreshTabs();
|
||||
_tabController.animateTo(_tabIds.length - 1);
|
||||
|
||||
Reference in New Issue
Block a user