fix(YouTube - Hide layout components): Hide emergency box when enabled

This commit is contained in:
oSumAtrIX 2023-12-27 05:01:48 +01:00
parent 741ab2468d
commit 6ca7946e8f
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4

View File

@ -130,6 +130,11 @@ public final class LayoutComponentsFilter extends Filter {
"channel_guidelines_entry_banner" "channel_guidelines_entry_banner"
); );
final var emergencyBox = new StringFilterGroup(
SettingsEnum.HIDE_EMERGENCY_BOX,
"emergency_onebox"
);
// The player audio track button does the exact same function as the audio track flyout menu option. // The player audio track button does the exact same function as the audio track flyout menu option.
// But if the copy url button is shown, these button clashes and the the audio button does not work. // But if the copy url button is shown, these button clashes and the the audio button does not work.
// Previously this was a setting to show/hide the player button. // Previously this was a setting to show/hide the player button.
@ -239,6 +244,7 @@ public final class LayoutComponentsFilter extends Filter {
medicalPanel, medicalPanel,
videoQualityMenuFooter, videoQualityMenuFooter,
infoPanel, infoPanel,
emergencyBox,
subscribersCommunityGuidelines, subscribersCommunityGuidelines,
channelGuidelines, channelGuidelines,
audioTrackButton, audioTrackButton,
@ -258,10 +264,10 @@ public final class LayoutComponentsFilter extends Filter {
return super.isFiltered(identifier, path, protobufBufferArray, matchedGroup, contentType, contentIndex); return super.isFiltered(identifier, path, protobufBufferArray, matchedGroup, contentType, contentIndex);
} }
} }
// The groups are excluded from the filter due to the exceptions list below. // The groups are excluded from the filter due to the exceptions list below.
// Filter them separately here. // Filter them separately here.
if (matchedGroup == notifyMe || matchedGroup == inFeedSurvey || matchedGroup == expandableMetadata) if (matchedGroup == notifyMe || matchedGroup == inFeedSurvey || matchedGroup == expandableMetadata)
return super.isFiltered(identifier, path, protobufBufferArray, matchedGroup, contentType, contentIndex); return super.isFiltered(identifier, path, protobufBufferArray, matchedGroup, contentType, contentIndex);
if (matchedGroup != custom && exceptions.matches(path)) if (matchedGroup != custom && exceptions.matches(path))