opt: remove unnecessary window listener
This commit is contained in:
parent
52f60154db
commit
01f497c234
@ -37,8 +37,7 @@ class ConnectionTabPage extends StatefulWidget {
|
|||||||
State<ConnectionTabPage> createState() => _ConnectionTabPageState(params);
|
State<ConnectionTabPage> createState() => _ConnectionTabPageState(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
class _ConnectionTabPageState extends State<ConnectionTabPage>
|
class _ConnectionTabPageState extends State<ConnectionTabPage> {
|
||||||
with MultiWindowListener {
|
|
||||||
final tabController = Get.put(DesktopTabController(
|
final tabController = Get.put(DesktopTabController(
|
||||||
tabType: DesktopTabType.remoteScreen,
|
tabType: DesktopTabType.remoteScreen,
|
||||||
onSelected: (_, id) => bind.setCurSessionId(id: id)));
|
onSelected: (_, id) => bind.setCurSessionId(id: id)));
|
||||||
@ -106,13 +105,11 @@ class _ConnectionTabPageState extends State<ConnectionTabPage>
|
|||||||
}
|
}
|
||||||
_update_remote_count();
|
_update_remote_count();
|
||||||
});
|
});
|
||||||
DesktopMultiWindow.addListener(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
super.dispose();
|
super.dispose();
|
||||||
DesktopMultiWindow.removeListener(this);
|
|
||||||
_menubarState.save();
|
_menubarState.save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user