Refactor: Cleanup app removal, remove legacy app list generator and CustomAppsList file support (#662)

* remove support for uninstalling old sunset apps

* Add color legend on app removal screen

* Remove legacy app list generator and custom apps file support
Replaced by GUI config export/import, dynamic RemovalMethod, and
CLI app removal settings saved to LastUsedSettings.json.

* Verify app removal by checking actual installation state instead of trusting winget output
This commit is contained in:
Jeffrey
2026-06-22 22:13:01 +02:00
committed by GitHub
parent 71e3f2e44d
commit d1fe541b62
22 changed files with 865 additions and 477 deletions

View File

@@ -53,12 +53,12 @@ function Show-AppSelectionWindow {
$window.Dispatcher.Invoke([System.Windows.Threading.DispatcherPriority]::Background, [action]{})
$appsPanel.Children.Clear()
$listOfApps = ""
$listOfApps = $null
if ($onlyInstalledBox.IsChecked -and ($script:WingetInstalled -eq $true)) {
# Attempt to get a list of installed apps via WinGet, times out after 10 seconds
$listOfApps = GetInstalledAppsViaWinget -TimeOut 10
if (-not $listOfApps) {
$listOfApps = GetInstalledAppsViaWinget -TimeOut 10 -NonBlocking
if ($null -eq $listOfApps) {
# Show error that the script was unable to get list of apps from WinGet
Show-MessageBox -Message 'Unable to load list of installed apps via WinGet.' -Title 'Error' -Button 'OK' -Icon 'Error' -Owner $window | Out-Null
$onlyInstalledBox.IsChecked = $false
@@ -134,7 +134,7 @@ function Show-AppSelectionWindow {
return
}
SaveCustomAppsListToFile -appsList $selectedApps
$script:SelectedApps = $selectedApps
$window.DialogResult = $true
})