mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-22 16:41:46 +03:00
[FEATURE] Возможность слежения за OptionalFile
This commit is contained in:
parent
1ae7c80c72
commit
459f305f13
2 changed files with 4 additions and 1 deletions
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue