mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2026-01-30 06:01:03 +00:00
feat(YouTube - Hide layout components): Add "Hide cell divider", "Hide featured links", and "Hide featured videos" options (#6335)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
committed by
GitHub
parent
a0ec4c07f7
commit
a5d197b977
@@ -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