opt: remove unnecessary window listener

This commit is contained in:
Kingtous 2022-12-21 11:50:30 +08:00
parent 52f60154db
commit 01f497c234

View File

@ -37,8 +37,7 @@ class ConnectionTabPage extends StatefulWidget {
State<ConnectionTabPage> createState() => _ConnectionTabPageState(params);
}
class _ConnectionTabPageState extends State<ConnectionTabPage>
with MultiWindowListener {
class _ConnectionTabPageState extends State<ConnectionTabPage> {
final tabController = Get.put(DesktopTabController(
tabType: DesktopTabType.remoteScreen,
onSelected: (_, id) => bind.setCurSessionId(id: id)));
@ -106,13 +105,11 @@ class _ConnectionTabPageState extends State<ConnectionTabPage>
}
_update_remote_count();
});
DesktopMultiWindow.addListener(this);
}
@override
void dispose() {
super.dispose();
DesktopMultiWindow.removeListener(this);
_menubarState.save();
}