mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2026-01-31 14:41:03 +00:00
merge dev
This commit is contained in:
@@ -58,6 +58,23 @@ public abstract class Setting<T> {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Availability based on a single parent setting being disabled.
|
||||
*/
|
||||
public static Availability parentNot(BooleanSetting parent) {
|
||||
return new Availability() {
|
||||
@Override
|
||||
public boolean isAvailable() {
|
||||
return !parent.get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Setting<?>> getParentSettings() {
|
||||
return Collections.singletonList(parent);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Availability based on all parents being enabled.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user