call tab onSelected at the end of tab's initState, needed by session

uuid

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2023-06-07 20:31:54 +08:00
parent 2ececed0c1
commit 60b87e554b
8 changed files with 58 additions and 28 deletions

View File

@@ -31,7 +31,7 @@ class _FileManagerTabPageState extends State<FileManagerTabPage> {
_FileManagerTabPageState(Map<String, dynamic> params) {
Get.put(DesktopTabController(tabType: DesktopTabType.fileTransfer));
tabController.onSelected = (_, id) {
tabController.onSelected = (id) {
WindowController.fromWindowId(windowId())
.setTitle(getWindowNameWithId(id));
};
@@ -44,6 +44,7 @@ class _FileManagerTabPageState extends State<FileManagerTabPage> {
page: FileManagerPage(
key: ValueKey(params['id']),
id: params['id'],
tabController: tabController,
forceRelay: params['forceRelay'],
)));
}
@@ -71,6 +72,7 @@ class _FileManagerTabPageState extends State<FileManagerTabPage> {
page: FileManagerPage(
key: ValueKey(id),
id: id,
tabController: tabController,
forceRelay: args['forceRelay'],
)));
} else if (call.method == "onDestroy") {