mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-12-07 01:51:27 +01:00
fix(YouTube - Hide layout components): Fix "Hide Hype points" (#6247)
This commit is contained in:
committed by
GitHub
parent
d80892cc0e
commit
582144026d
@@ -17,6 +17,7 @@ final class DescriptionComponentsFilter extends Filter {
|
|||||||
private final ByteArrayFilterGroup cellVideoAttribute;
|
private final ByteArrayFilterGroup cellVideoAttribute;
|
||||||
|
|
||||||
private final StringFilterGroup aiGeneratedVideoSummarySection;
|
private final StringFilterGroup aiGeneratedVideoSummarySection;
|
||||||
|
private final StringFilterGroup hypePoints;
|
||||||
|
|
||||||
public DescriptionComponentsFilter() {
|
public DescriptionComponentsFilter() {
|
||||||
exceptions.addPatterns(
|
exceptions.addPatterns(
|
||||||
@@ -63,7 +64,7 @@ final class DescriptionComponentsFilter extends Filter {
|
|||||||
"how_this_was_made_section"
|
"how_this_was_made_section"
|
||||||
);
|
);
|
||||||
|
|
||||||
final StringFilterGroup hypePoints = new StringFilterGroup(
|
hypePoints = new StringFilterGroup(
|
||||||
Settings.HIDE_HYPE_POINTS,
|
Settings.HIDE_HYPE_POINTS,
|
||||||
"hype_points_factoid"
|
"hype_points_factoid"
|
||||||
);
|
);
|
||||||
@@ -112,7 +113,7 @@ final class DescriptionComponentsFilter extends Filter {
|
|||||||
boolean isFiltered(String identifier, String path, byte[] buffer,
|
boolean isFiltered(String identifier, String path, byte[] buffer,
|
||||||
StringFilterGroup matchedGroup, FilterContentType contentType, int contentIndex) {
|
StringFilterGroup matchedGroup, FilterContentType contentType, int contentIndex) {
|
||||||
|
|
||||||
if (matchedGroup == aiGeneratedVideoSummarySection) {
|
if (matchedGroup == aiGeneratedVideoSummarySection || matchedGroup == hypePoints) {
|
||||||
// Only hide if player is open, in case this component is used somewhere else.
|
// Only hide if player is open, in case this component is used somewhere else.
|
||||||
return PlayerType.getCurrent().isMaximizedOrFullscreen();
|
return PlayerType.getCurrent().isMaximizedOrFullscreen();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user