This commit is contained in:
Łukasz Domeradzki
2024-12-20 14:54:33 +01:00
parent 267384ad59
commit f7f7dbdab8

View File

@@ -3186,7 +3186,7 @@ public sealed class Bot : IAsyncDisposable, IDisposable {
bool hasNewEntries = false;
// We want to record only the most relevant entry, therefore we apply ordering here so we end up preferably with the most recent non-borrowed entry
foreach (SteamApps.LicenseListCallback.License license in callback.LicenseList.OrderByDescending(static license => license.LicenseFlags.HasFlag(ELicenseFlags.Borrowed)).ThenBy(static license => license.TimeCreated)) {
foreach (SteamApps.LicenseListCallback.License license in callback.LicenseList.OrderByDescending(static license => !license.LicenseFlags.HasFlag(ELicenseFlags.Borrowed)).ThenByDescending(static license => license.TimeCreated).Where(license => !ownedPackages.ContainsKey(license.PackageID))) {
ownedPackages[license.PackageID] = new LicenseData {
LicenseFlags = license.LicenseFlags,
PackageID = license.PackageID,