fix(gui): treat dismissed unsafe-removal confirmation as decline (#651)

This commit is contained in:
HetCreep
2026-06-21 23:42:47 +07:00
committed by GitHub
parent 469751f8e8
commit 91a6266d50

View File

@@ -16,7 +16,7 @@ function ConfirmUnsafeAppRemoval {
if ($SelectedApps -contains "Microsoft.WindowsStore") { if ($SelectedApps -contains "Microsoft.WindowsStore") {
$result = Show-MessageBox -Message 'Are you sure that you wish to uninstall the Microsoft Store? This app cannot easily be reinstalled.' -Title 'Are you sure?' -Button 'YesNo' -Icon 'Warning' -Owner $Owner $result = Show-MessageBox -Message 'Are you sure that you wish to uninstall the Microsoft Store? This app cannot easily be reinstalled.' -Title 'Are you sure?' -Button 'YesNo' -Icon 'Warning' -Owner $Owner
if ($result -eq 'No') { if ($result -ne 'Yes') {
return $false return $false
} }
} }
@@ -25,7 +25,7 @@ function ConfirmUnsafeAppRemoval {
if ($SelectedApps -contains "Microsoft.WindowsTerminal") { if ($SelectedApps -contains "Microsoft.WindowsTerminal") {
$result = Show-MessageBox -Message 'Are you sure that you wish to remove Windows Terminal? Windows Terminal is the default command-line app for Windows. Ensure you are not running Win11Debloat via Windows Terminal before proceeding to avoid a mid-process failure.' -Title 'Are you sure?' -Button 'YesNo' -Icon 'Warning' -Owner $Owner $result = Show-MessageBox -Message 'Are you sure that you wish to remove Windows Terminal? Windows Terminal is the default command-line app for Windows. Ensure you are not running Win11Debloat via Windows Terminal before proceeding to avoid a mid-process failure.' -Title 'Are you sure?' -Button 'YesNo' -Icon 'Warning' -Owner $Owner
if ($result -eq 'No') { if ($result -ne 'Yes') {
return $false return $false
} }
} }