From ef0dc234f36496f0887ac1fb1949a419ff8291c3 Mon Sep 17 00:00:00 2001 From: fscarponi Date: Thu, 25 Jan 2024 16:01:46 +0100 Subject: [PATCH] Fix jewel api usage --- .../plugin/ui/panels/side/PackageSearchInfoPanel.kt | 6 +++--- .../plugin/ui/panels/tree/PackageSearchModulesTree.kt | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/plugin/src/main/kotlin/com/jetbrains/packagesearch/plugin/ui/panels/side/PackageSearchInfoPanel.kt b/plugin/src/main/kotlin/com/jetbrains/packagesearch/plugin/ui/panels/side/PackageSearchInfoPanel.kt index 330c86fd..320eff28 100644 --- a/plugin/src/main/kotlin/com/jetbrains/packagesearch/plugin/ui/panels/side/PackageSearchInfoPanel.kt +++ b/plugin/src/main/kotlin/com/jetbrains/packagesearch/plugin/ui/panels/side/PackageSearchInfoPanel.kt @@ -45,12 +45,12 @@ fun PackageSearchInfoPanel( modifier = Modifier.fillMaxWidth(), tabs = tabs.map { infoPanelContent -> TabData.Default( - selected = activeTabTitle == infoPanelContent.tabTitle, + selected = activeTabTitle == infoPanelContent.tabTitleData.tabTitle, closable = false, content = { tabState -> - SimpleTabContent(infoPanelContent.tabTitle, tabState) + SimpleTabContent(infoPanelContent.tabTitleData.tabTitle, tabState) }, - onClick = { viewModel.setActiveTabTitle(infoPanelContent.tabTitle) }, + onClick = { viewModel.setActiveTabTitle(infoPanelContent.tabTitleData.tabTitle) }, ) } ) diff --git a/plugin/src/main/kotlin/com/jetbrains/packagesearch/plugin/ui/panels/tree/PackageSearchModulesTree.kt b/plugin/src/main/kotlin/com/jetbrains/packagesearch/plugin/ui/panels/tree/PackageSearchModulesTree.kt index 4f98fd43..15565fde 100644 --- a/plugin/src/main/kotlin/com/jetbrains/packagesearch/plugin/ui/panels/tree/PackageSearchModulesTree.kt +++ b/plugin/src/main/kotlin/com/jetbrains/packagesearch/plugin/ui/panels/tree/PackageSearchModulesTree.kt @@ -55,7 +55,7 @@ fun PackageSearchModulesTree( onExpandAll = viewModel::expandAll, onCollapseAll = { val rootIds = tree.roots.map { it.id }.toSet() - viewModel.treeState.selectedKeys = (viewModel.treeState.selectedKeys intersect rootIds).toList() + viewModel.treeState.selectedKeys = viewModel.treeState.selectedKeys intersect rootIds viewModel.collapseAll() }, ) @@ -74,7 +74,7 @@ fun PackageSearchModulesTree( viewModel.treeState.selectedKeys = tree.walkBreadthFirst() .take(1) .map { it.data.id } - .toList() + .toSet() } } Box {