run preprocessing

This commit is contained in:
MyDrift
2024-11-02 13:51:48 +01:00
parent c46a7eaa40
commit 5514025577
11 changed files with 45 additions and 45 deletions

View File

@ -2,10 +2,10 @@ function Set-CategoryVisibility {
<#
.SYNOPSIS
Used to expand or collapse categories and corresponding apps on the install tab
.PARAMETER Category
Can eigther be a specific category name like "Browsers" OR "*" to affect all categories at once
.PARAMETER overrideState
"Expand" => expands the corresponding elements
"Collapse" => collapses the corresponding elements
@ -17,8 +17,8 @@ function Set-CategoryVisibility {
[ValidateSet("Expand", "Collapse")]
[string]$overrideState
)
switch ($overrideState){
switch ($overrideState) {
"Expand" {$state = $true}
"Collapse" {$state = $false}
default {$state = $sync.CompactView}
@ -29,7 +29,7 @@ function Set-CategoryVisibility {
if ($category -eq "*") {
$items = $sync.ItemsControl.Items | Where-Object {($_.Tag -like "CategoryWrapPanel_*")}
$sync.ItemsControl.Items | Where-Object {($_.Tag -eq "CategoryToggleButton")} | Foreach-Object { $_.Visibility = [Windows.Visibility]::Visible; $_.IsChecked = $state }
} else {
$items = $sync.ItemsControl.Items | Where-Object {($_.Tag -eq "CategoryWrapPanel_$Category")}
}
@ -41,4 +41,4 @@ function Set-CategoryVisibility {
$items.Children | ForEach-Object {
$_.Visibility = $elementVisibility
}
}
}