Version Fix and Locale Updates (#3626)

This commit is contained in:
Joe Milazzo 2025-03-13 17:54:55 -05:00 committed by GitHub
parent b644022f30
commit a6ccae5849
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 360 additions and 58 deletions

View file

@ -399,10 +399,19 @@ public partial class VersionUpdaterService : IVersionUpdaterService
public async Task<int> GetNumberOfReleasesBehind()
{
var updates = await GetAllReleases();
return updates
// If the user is on nightly, then we need to handle releases behind differently
if (updates[0].IsPrerelease)
{
return Math.Min(0, updates
.TakeWhile(update => update.UpdateVersion != update.CurrentVersion)
.Count() - 1);
}
return Math.Min(0, updates
.Where(update => !update.IsPrerelease)
.TakeWhile(update => update.UpdateVersion != update.CurrentVersion)
.Count();
.Count());
}
private UpdateNotificationDto? CreateDto(GithubReleaseMetadata? update)