mirror of
https://github.com/GravitLauncher/Launcher
synced 2025-01-03 22:30:31 +03:00
[STYLE] Rename "xorConflict" to "group"
This commit is contained in:
parent
ab7487872c
commit
61e5f94663
3 changed files with 20 additions and 20 deletions
|
@ -254,10 +254,10 @@ public void updateOptionalGraph() {
|
|||
file.conflict[i] = getOptionalFile(file.conflictFile[i].name);
|
||||
}
|
||||
}
|
||||
if(file.xorConflictFile != null) {
|
||||
file.xorConflict = new OptionalFile[file.xorConflictFile.length];
|
||||
for(int i = 0; i < file.xorConflictFile.length; ++i) {
|
||||
file.xorConflict[i] = getOptionalFile(file.xorConflictFile[i].name);
|
||||
if(file.groupFile != null) {
|
||||
file.group = new OptionalFile[file.groupFile.length];
|
||||
for(int i = 0; i < file.groupFile.length; ++i) {
|
||||
file.group[i] = getOptionalFile(file.groupFile[i].name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -375,10 +375,10 @@ public void verify() {
|
|||
if (s == null)
|
||||
throw new IllegalArgumentException(String.format("Found null entry in updateOptional.%s.dependenciesFile", f.name));
|
||||
}
|
||||
if(f.xorConflictFile != null)
|
||||
for (OptionalDepend s : f.xorConflictFile) {
|
||||
if(f.groupFile != null)
|
||||
for (OptionalDepend s : f.groupFile) {
|
||||
if (s == null)
|
||||
throw new IllegalArgumentException(String.format("Found null entry in updateOptional.%s.xorConflictFile", f.name));
|
||||
throw new IllegalArgumentException(String.format("Found null entry in updateOptional.%s.groupFile", f.name));
|
||||
}
|
||||
if (f.triggersList != null) {
|
||||
for (OptionalTrigger trigger : f.triggersList) {
|
||||
|
|
|
@ -24,13 +24,13 @@ public class OptionalFile {
|
|||
@LauncherNetworkAPI
|
||||
public OptionalDepend[] conflictFile;
|
||||
@LauncherNetworkAPI
|
||||
public OptionalDepend[] xorConflictFile;
|
||||
public OptionalDepend[] groupFile;
|
||||
@LauncherNetworkAPI
|
||||
public transient OptionalFile[] dependencies;
|
||||
@LauncherNetworkAPI
|
||||
public transient OptionalFile[] conflict;
|
||||
@LauncherNetworkAPI
|
||||
public transient OptionalFile[] xorConflict;
|
||||
public transient OptionalFile[] group;
|
||||
@LauncherNetworkAPI
|
||||
public int subTreeLevel = 1;
|
||||
@LauncherNetworkAPI
|
||||
|
|
|
@ -88,8 +88,8 @@ public Set<OptionalAction> getEnabledActions() {
|
|||
public void fixDependencies() {
|
||||
Set<OptionalFile> disabled = all.stream().filter(t -> !isEnabled(t)).collect(Collectors.toSet());
|
||||
for (OptionalFile file : disabled) {
|
||||
if (file.xorConflict != null && Arrays.stream(file.xorConflict).noneMatch(this::isEnabled)) {
|
||||
enable(file.xorConflict[0], false, null);
|
||||
if (file.group != null && Arrays.stream(file.group).noneMatch(this::isEnabled)) {
|
||||
enable(file.group[0], false, null);
|
||||
}
|
||||
}
|
||||
for (OptionalFile file : enabled) {
|
||||
|
@ -103,9 +103,9 @@ public void fixDependencies() {
|
|||
disable(conflict, null);
|
||||
}
|
||||
}
|
||||
if (file.xorConflict != null) {
|
||||
for (OptionalFile xorConflict : file.xorConflict) {
|
||||
disable(xorConflict, null);
|
||||
if (file.group != null) {
|
||||
for (OptionalFile member : file.group) {
|
||||
disable(member, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -142,9 +142,9 @@ public void enable(OptionalFile file, boolean manual, BiConsumer<OptionalFile, B
|
|||
disable(conflict, callback);
|
||||
}
|
||||
}
|
||||
if(file.xorConflict != null) {
|
||||
for(OptionalFile xorConflict : file.xorConflict) {
|
||||
disable(xorConflict, callback);
|
||||
if(file.group != null) {
|
||||
for(OptionalFile member : file.group) {
|
||||
disable(member, callback);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -165,9 +165,9 @@ public void disable(OptionalFile file, BiConsumer<OptionalFile, Boolean> callbac
|
|||
}
|
||||
}
|
||||
}
|
||||
if (file.xorConflict != null && file.xorConflict.length != 0) {
|
||||
if (Arrays.stream(file.xorConflict).noneMatch(this::isEnabled)) {
|
||||
enable(file.xorConflict[0], false, callback);
|
||||
if (file.group != null && file.group.length != 0) {
|
||||
if (Arrays.stream(file.group).noneMatch(this::isEnabled)) {
|
||||
enable(file.group[0], false, callback);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue