Skip to content

Commit cecc61c

Browse files
committed
Propagate deprecated flag in ContributedPlatformReleases
1 parent bf2f90d commit cecc61c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

app/src/cc/arduino/contributions/packages/ui/ContributedPlatformReleases.java

+9-1
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,14 @@ public class ContributedPlatformReleases {
4444
public final List<ContributedPlatform> releases;
4545
public final List<String> versions;
4646
public ContributedPlatform selected = null;
47+
public boolean deprecated;
4748

4849
public ContributedPlatformReleases(ContributedPlatform platform) {
4950
packager = platform.getParentPackage();
5051
arch = platform.getArchitecture();
5152
releases = new LinkedList<>();
5253
versions = new LinkedList<>();
54+
deprecated = platform.isDeprecated();
5355
add(platform);
5456
}
5557

@@ -65,7 +67,9 @@ public void add(ContributedPlatform platform) {
6567
if (version != null) {
6668
versions.add(version);
6769
}
68-
selected = getLatest();
70+
ContributedPlatform latest = getLatest();
71+
selected = latest;
72+
deprecated = latest.isDeprecated();
6973
}
7074

7175
public ContributedPlatform getInstalled() {
@@ -89,6 +93,10 @@ public ContributedPlatform getSelected() {
8993
return selected;
9094
}
9195

96+
public boolean isDeprecated() {
97+
return deprecated;
98+
}
99+
92100
public void select(ContributedPlatform value) {
93101
for (ContributedPlatform plat : releases) {
94102
if (plat == value) {

0 commit comments

Comments
 (0)