Version Fix and Locale Updates (#3626)
This commit is contained in:
parent
b644022f30
commit
a6ccae5849
15 changed files with 360 additions and 58 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue