Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using UniGetUI.Core.SettingsEngine;
using UniGetUI.Core.Tools;
using UniGetUI.PackageEngine.Classes.Manager.BaseProviders;
using UniGetUI.PackageEngine.Classes.Packages.Classes;
using UniGetUI.PackageEngine.Enums;
using UniGetUI.PackageEngine.Interfaces;

Expand Down Expand Up @@ -157,10 +158,16 @@ protected override OperationVeredict _getOperationResult(
return OperationVeredict.Failure;
}

if (uintCode is 0x8A15002B)
{ // TODO: The update cannot be installed (not applicable)
return OperationVeredict.Failure;
}
if (uintCode is 0x8A15002B)
{
if (Settings.Get("IgnoreUpdatesNotApplicable"))
{
Logger.Warn($"Ignoring update {package.Id} as the update is not applicable to the platform, and the user has enabled IgnoreUpdatesNotApplicable");
IgnoredUpdatesDatabase.Add(IgnoredUpdatesDatabase.GetIgnoredIdForPackage(package), package.VersionString);
return OperationVeredict.Success;
}
return OperationVeredict.Failure;
}

if (uintCode is 0x8A15010D or 0x8A15004F or 0x8A15010E)
{ // Application is already installed
Expand Down
7 changes: 7 additions & 0 deletions src/UniGetUI/Pages/SettingsPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
private readonly TextBlock BackupDirectoryLabel;
private readonly bool InterfaceLoaded;

public SettingsPage()

Check warning on line 38 in src/UniGetUI/Pages/SettingsPage.xaml.cs

View workflow job for this annotation

GitHub Actions / test-codebase

Non-nullable field 'ResetBackupDirectory' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.

Check warning on line 38 in src/UniGetUI/Pages/SettingsPage.xaml.cs

View workflow job for this annotation

GitHub Actions / test-codebase

Non-nullable field 'OpenBackupDirectory' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.

Check warning on line 38 in src/UniGetUI/Pages/SettingsPage.xaml.cs

View workflow job for this annotation

GitHub Actions / test-codebase

Non-nullable field 'BackupDirectoryLabel' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.
{
InitializeComponent();

Expand Down Expand Up @@ -196,10 +196,17 @@
_ = PEInterface.InstalledPackagesLoader.ReloadPackages();
};

CheckboxCard WinGet_HideNonApplicableUpdates = new()
{
Text = CoreTools.Translate("Add updates that fail with a 'no applicable update found' to the ignored updates list"),
SettingName = "IgnoreUpdatesNotApplicable"
};

ExtraSettingsCards[PEInterface.WinGet].Add(WinGet_EnableTroubleshooter);
ExtraSettingsCards[PEInterface.WinGet].Add(WinGet_EnableTroubleshooter_v2);
ExtraSettingsCards[PEInterface.WinGet].Add(WinGet_ResetWindowsIPackageManager);
ExtraSettingsCards[PEInterface.WinGet].Add(WinGet_UseBundled);
ExtraSettingsCards[PEInterface.WinGet].Add(WinGet_HideNonApplicableUpdates);

// ----------------------------------------------------------------------------------------

Expand Down
Loading