diff --git a/app/src/cc/arduino/contributions/packages/ui/ContributedPlatformReleases.java b/app/src/cc/arduino/contributions/packages/ui/ContributedPlatformReleases.java index 3545b1ff4..fc516512d 100644 --- a/app/src/cc/arduino/contributions/packages/ui/ContributedPlatformReleases.java +++ b/app/src/cc/arduino/contributions/packages/ui/ContributedPlatformReleases.java @@ -44,12 +44,14 @@ public class ContributedPlatformReleases { public final List releases; public final List versions; public ContributedPlatform selected = null; + public boolean deprecated; public ContributedPlatformReleases(ContributedPlatform platform) { packager = platform.getParentPackage(); arch = platform.getArchitecture(); releases = new LinkedList<>(); versions = new LinkedList<>(); + deprecated = platform.isDeprecated(); add(platform); } @@ -65,7 +67,9 @@ public class ContributedPlatformReleases { if (version != null) { versions.add(version); } - selected = getLatest(); + ContributedPlatform latest = getLatest(); + selected = latest; + deprecated = latest.isDeprecated(); } public ContributedPlatform getInstalled() { @@ -89,6 +93,10 @@ public class ContributedPlatformReleases { return selected; } + public boolean isDeprecated() { + return deprecated; + } + public void select(ContributedPlatform value) { for (ContributedPlatform plat : releases) { if (plat == value) {