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
9 changes: 7 additions & 2 deletions src/SharedMauiCoreLibrary.Licensing/LicenseManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -354,11 +354,13 @@ public async Task<IApplicationVersionResult> GetLatestApplicationVersionAsync(IL
WooCodeVersionResponse[] wooResult = await QueryLatestApplicationVersionFromWooCommerceAsync(WooSoftwareLicenseAction.CodeVersion, license).ConfigureAwait(false);
if (wooResult?.All(result => result.Status == "success" && (result.ErrorCode == "s403")) == true)
{
WooCodeVersionResponse res = wooResult.First();
result = new()
{
Success = true,
//Message = string.Join("|", wooResult?.Select(result => result.VersionMessage)),
Message = res.VersionMessage.UpgradeNotice,
TimeStamp = DateTimeOffset.Now,
Version = res.VersionMessage.Version
};
}
else
Expand Down Expand Up @@ -394,11 +396,13 @@ public async Task<IApplicationVersionResult> GetLatestApplicationVersionAsync(st
WooCodeVersionResponse[] wooResult = await QueryLatestApplicationVersionFromWooCommerceAsync(WooSoftwareLicenseAction.CodeVersion, productCode).ConfigureAwait(false);
if (wooResult?.All(result => result.Status == "success" && (result.ErrorCode == "s403")) == true)
{
WooCodeVersionResponse res = wooResult.First();
result = new()
{
Success = true,
//Message = string.Join("|", wooResult?.Select(result => result.VersionMessage)),
Message = res.VersionMessage.UpgradeNotice,
TimeStamp = DateTimeOffset.Now,
Version = res.VersionMessage.Version
};
}
else
Expand All @@ -408,6 +412,7 @@ public async Task<IApplicationVersionResult> GetLatestApplicationVersionAsync(st
Success = false,
//Message = string.Join("|", wooResult?.Select(result => result.VersionMessage)),
TimeStamp = DateTimeOffset.Now,
Version = "0.0.0",
};
}
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,21 @@ public override async Task<bool> CheckForUpdateAsync(string productCode, string?
return updateAvailable;
}
IsCheckingForUpdates = true;
if (DeviceInfo.Platform == DevicePlatform.WinUI)
if (DeviceInfo.Platform == DevicePlatform.WinUI || DeviceInfo.Platform == DevicePlatform.MacCatalyst)
{
IApplicationVersionResult? res = await LicenseManager.GetLatestApplicationVersionAsync(productCode: productCode, target: Enums.LicenseServerTarget.WooCommerce, null, null);
IApplicationVersionResult? res = await LicenseManager
.GetLatestApplicationVersionAsync(productCode: productCode, target: Enums.LicenseServerTarget.WooCommerce, null, null)
.ConfigureAwait(false);
OnUpdateAvailable(new()
{
LatestVersion = new(res?.Version ?? "0.0.0"),
});
}
else
{
OnClientIncompatibleWithNewVersion();
return updateAvailable;
}
IsCheckingForUpdates = false;
return updateAvailable;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public static FirebaseHandler? Instance
#endregion

#region Properties

[ObservableProperty]
public partial ConcurrentDictionary<Type, IDisposable> Subscriptions { get; set; } = [];
#endregion
Expand Down
Loading