diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/ClientProfile.java b/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/ClientProfile.java index d60a77f4..2f3b7b6b 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/ClientProfile.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/ClientProfile.java @@ -256,6 +256,7 @@ public void markOptional(OptionalFile file) { if (file.mark) return; file.mark = true; + file.notifyObservers(true); if (file.dependencies != null) { for (OptionalFile dep : file.dependencies) { if (dep.dependenciesCount == null) dep.dependenciesCount = new HashSet<>(); @@ -283,6 +284,7 @@ public void unmarkOptional(String name, OptionalType type) { public void unmarkOptional(OptionalFile file) { if (!file.mark) return; file.mark = false; + file.notifyObservers(false); if (file.dependenciesCount != null) { for (OptionalFile f : file.dependenciesCount) { if (f.isPreset) continue; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/OptionalFile.java b/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/OptionalFile.java index 43d5f22a..237deb22 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/OptionalFile.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/OptionalFile.java @@ -7,9 +7,10 @@ import java.io.IOException; import java.util.Objects; +import java.util.Observable; import java.util.Set; -public class OptionalFile { +public class OptionalFile extends Observable { @LauncherNetworkAPI public String[] list; @LauncherNetworkAPI