Skip to content

Commit

Permalink
fix(YouTube - Hide layout components): Hide emergency box when enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
oSumAtrIX committed Dec 27, 2023
1 parent 741ab24 commit 6ca7946
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@ public LayoutComponentsFilter() {
"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.
// 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.
Expand Down Expand Up @@ -239,6 +244,7 @@ public LayoutComponentsFilter() {
medicalPanel,
videoQualityMenuFooter,
infoPanel,
emergencyBox,
subscribersCommunityGuidelines,
channelGuidelines,
audioTrackButton,
Expand All @@ -258,10 +264,10 @@ public boolean isFiltered(@Nullable String identifier, String path, byte[] proto
return super.isFiltered(identifier, path, protobufBufferArray, matchedGroup, contentType, contentIndex);
}
}

// The groups are excluded from the filter due to the exceptions list below.
// 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);

if (matchedGroup != custom && exceptions.matches(path))
Expand Down

0 comments on commit 6ca7946

Please sign in to comment.