mirror of
https://github.com/revanced/revanced-integrations.git
synced 2024-12-24 03:35:49 +01:00
fix(YouTube - Hide Layout components): Exempt expandable chips from exceptions (#498)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
parent
4f50ac6c49
commit
6f79746d78
@ -22,6 +22,7 @@ public final class LayoutComponentsFilter extends Filter {
|
||||
private final StringFilterGroup searchResultShelfHeader;
|
||||
private final StringFilterGroup inFeedSurvey;
|
||||
private final StringFilterGroup notifyMe;
|
||||
private final StringFilterGroup expandableMetadata;
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.N)
|
||||
public LayoutComponentsFilter() {
|
||||
@ -114,7 +115,7 @@ public final class LayoutComponentsFilter extends Filter {
|
||||
"official_card"
|
||||
);
|
||||
|
||||
final var expandableMetadata = new StringFilterGroup(
|
||||
expandableMetadata = new StringFilterGroup(
|
||||
SettingsEnum.HIDE_EXPANDABLE_CHIP,
|
||||
"inline_expander"
|
||||
);
|
||||
@ -219,7 +220,8 @@ public final class LayoutComponentsFilter extends Filter {
|
||||
|
||||
// The groups are excluded from the filter due to the exceptions list below.
|
||||
// Filter them separately here.
|
||||
if (matchedGroup == notifyMe || matchedGroup == inFeedSurvey) return true;
|
||||
if (matchedGroup == notifyMe || matchedGroup == inFeedSurvey || matchedGroup == expandableMetadata)
|
||||
return super.isFiltered(identifier, path, protobufBufferArray, matchedList, matchedGroup, matchedIndex);
|
||||
|
||||
if (matchedGroup != custom && exceptions.matches(path))
|
||||
return false; // Exceptions are not filtered.
|
||||
|
Loading…
Reference in New Issue
Block a user