From 662139ca5f3aed944ded2833f5acbd91377dd206 Mon Sep 17 00:00:00 2001 From: Martin Wiethan <47688561+Marterich@users.noreply.github.com> Date: Sat, 21 Sep 2024 17:03:56 +0200 Subject: [PATCH] Fix prefer choco visibility (#2782) --- scripts/main.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index d0fb1b3f..61f6845f 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -452,8 +452,8 @@ $sync["SearchBar"].Add_TextChanged({ $textToSearch = $sync.SearchBar.Text.ToLower() foreach ($CheckBox in $CheckBoxes) { - # Check if the checkbox is null or if it doesn't have content - if ($CheckBox -eq $null -or $CheckBox.Value -eq $null -or $CheckBox.Value.Content -eq $null) { + # Skip if the checkbox is null, it doesn't have content or it is the prefer Choco checkbox + if ($CheckBox -eq $null -or $CheckBox.Value -eq $null -or $CheckBox.Value.Content -eq $null -or $CheckBox.Name -eq "WPFpreferChocolatey") { continue }