File tree Expand file tree Collapse file tree 2 files changed +18
-4
lines changed
UniGetUI.PackageEngine.Managers.WinGet/Helpers Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Original file line number Diff line number Diff line change 44using UniGetUI . Core . SettingsEngine ;
55using UniGetUI . Core . Tools ;
66using UniGetUI . PackageEngine . Classes . Manager . BaseProviders ;
7+ using UniGetUI . PackageEngine . Classes . Packages . Classes ;
78using UniGetUI . PackageEngine . Enums ;
89using UniGetUI . PackageEngine . Interfaces ;
910
@@ -157,10 +158,16 @@ protected override OperationVeredict _getOperationResult(
157158 return OperationVeredict . Failure ;
158159 }
159160
160- if ( uintCode is 0x8A15002B )
161- { // TODO: The update cannot be installed (not applicable)
162- return OperationVeredict . Failure ;
163- }
161+ if ( uintCode is 0x8A15002B )
162+ {
163+ if ( Settings . Get ( "IgnoreUpdatesNotApplicable" ) )
164+ {
165+ Logger . Warn ( $ "Ignoring update { package . Id } as the update is not applicable to the platform, and the user has enabled IgnoreUpdatesNotApplicable") ;
166+ IgnoredUpdatesDatabase . Add ( IgnoredUpdatesDatabase . GetIgnoredIdForPackage ( package ) , package . VersionString ) ;
167+ return OperationVeredict . Success ;
168+ }
169+ return OperationVeredict . Failure ;
170+ }
164171
165172 if ( uintCode is 0x8A15010D or 0x8A15004F or 0x8A15010E )
166173 { // Application is already installed
Original file line number Diff line number Diff line change @@ -196,10 +196,17 @@ public SettingsPage()
196196 _ = PEInterface . InstalledPackagesLoader . ReloadPackages ( ) ;
197197 } ;
198198
199+ CheckboxCard WinGet_HideNonApplicableUpdates = new ( )
200+ {
201+ Text = CoreTools . Translate ( "Add updates that fail with a 'no applicable update found' to the ignored updates list" ) ,
202+ SettingName = "IgnoreUpdatesNotApplicable"
203+ } ;
204+
199205 ExtraSettingsCards [ PEInterface . WinGet ] . Add ( WinGet_EnableTroubleshooter ) ;
200206 ExtraSettingsCards [ PEInterface . WinGet ] . Add ( WinGet_EnableTroubleshooter_v2 ) ;
201207 ExtraSettingsCards [ PEInterface . WinGet ] . Add ( WinGet_ResetWindowsIPackageManager ) ;
202208 ExtraSettingsCards [ PEInterface . WinGet ] . Add ( WinGet_UseBundled ) ;
209+ ExtraSettingsCards [ PEInterface . WinGet ] . Add ( WinGet_HideNonApplicableUpdates ) ;
203210
204211 // ----------------------------------------------------------------------------------------
205212
You can’t perform that action at this time.
0 commit comments