Skip to content

Commit 86a66d8

Browse files
authored
Merge pull request LykosAI#1072 from ionite34/backport/main/pr-1069
2 parents 8560162 + 112a08d commit 86a66d8

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

StabilityMatrix.Avalonia/Models/UpdateChannelCard.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ public partial class UpdateChannelCard : ObservableObject
2020
[NotifyPropertyChangedFor(nameof(IsLatestVersionUpdateable))]
2121
private SemVersion? latestVersion;
2222

23-
public string? LatestVersionString =>
24-
LatestVersion is null ? null : $"Latest: v{LatestVersion}";
23+
public string? LatestVersionString => LatestVersion is null ? null : $"Latest: v{LatestVersion}";
2524

2625
[ObservableProperty]
2726
private bool isSelectable = true;
@@ -49,6 +48,12 @@ public bool IsLatestVersionUpdateable
4948
var updateHash = LatestVersion.Metadata;
5049
var appHash = Compat.AppVersion.Metadata;
5150

51+
// Always assume update if (We don't have hash && Update has hash)
52+
if (string.IsNullOrEmpty(appHash) && !string.IsNullOrEmpty(updateHash))
53+
{
54+
return true;
55+
}
56+
5257
// Trim both to the lower length, to a minimum of 7 characters
5358
var minLength = Math.Min(7, Math.Min(updateHash.Length, appHash.Length));
5459
updateHash = updateHash[..minLength];

StabilityMatrix.Core/Updater/UpdateHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ private bool ValidateUpdate(UpdateInfo? update)
277277
var appHash = Compat.AppVersion.Metadata;
278278

279279
// Always assume update if (We don't have hash && Update has hash)
280-
if (string.IsNullOrEmpty(updateHash) && !string.IsNullOrEmpty(appHash))
280+
if (string.IsNullOrEmpty(appHash) && !string.IsNullOrEmpty(updateHash))
281281
{
282282
return true;
283283
}

0 commit comments

Comments
 (0)