mirror of
https://github.com/Sonarr/Sonarr
synced 2025-02-23 22:51:19 +00:00
Update UI will still load if no updates are available
This commit is contained in:
parent
db4eadac40
commit
8bf1d512c2
1 changed files with 13 additions and 10 deletions
|
@ -22,19 +22,22 @@ namespace NzbDrone.Api.Update
|
||||||
.OrderByDescending(u => u.Version)
|
.OrderByDescending(u => u.Version)
|
||||||
.InjectTo<List<UpdateResource>>();
|
.InjectTo<List<UpdateResource>>();
|
||||||
|
|
||||||
var first = resources.First();
|
if (resources.Any())
|
||||||
first.Latest = true;
|
|
||||||
|
|
||||||
if (first.Version > BuildInfo.Version)
|
|
||||||
{
|
{
|
||||||
first.Installable = true;
|
var first = resources.First();
|
||||||
}
|
first.Latest = true;
|
||||||
|
|
||||||
var installed = resources.SingleOrDefault(r => r.Version == BuildInfo.Version);
|
if (first.Version > BuildInfo.Version)
|
||||||
|
{
|
||||||
|
first.Installable = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (installed != null)
|
var installed = resources.SingleOrDefault(r => r.Version == BuildInfo.Version);
|
||||||
{
|
|
||||||
installed.Installed = true;
|
if (installed != null)
|
||||||
|
{
|
||||||
|
installed.Installed = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return resources;
|
return resources;
|
||||||
|
|
Loading…
Reference in a new issue