ensure connection close

This commit is contained in:
csf 2022-08-16 22:15:45 +08:00
parent ce050e250d
commit 97614b3930
2 changed files with 2 additions and 0 deletions

View File

@ -104,6 +104,7 @@ class _ConnectionTabPageState extends State<ConnectionTabPage>
void onRemoveId(String id) {
DesktopTabBar.onClose(this, tabController, tabs, id);
ffi(id).close();
if (tabs.length == 0) {
WindowController.fromWindowId(windowId()).close();
}

View File

@ -93,6 +93,7 @@ class _FileManagerTabPageState extends State<FileManagerTabPage>
void onRemoveId(String id) {
DesktopTabBar.onClose(this, tabController, tabs, id);
ffi(id).close();
if (tabs.length == 0) {
WindowController.fromWindowId(windowId()).close();
}