mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Added validation to check if the contrib is actually starred
This commit is contained in:
@@ -91,6 +91,19 @@ public abstract class LocalContribution extends Contribution {
|
||||
name = folder.getName();
|
||||
categories = defaultCategory();
|
||||
}
|
||||
|
||||
if (categories.contains(SPECIAL_CATEGORY_NAME))
|
||||
validateSpecial();
|
||||
}
|
||||
|
||||
|
||||
private void validateSpecial() {
|
||||
for (AvailableContribution available : ContributionListing.getInstance().advertisedContributions)
|
||||
if (available.getName().equals(name)) {
|
||||
if (!available.isSpecial())
|
||||
categories.remove(SPECIAL_CATEGORY_NAME);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user