fix(YouTube - Hide layout components): Do not hide community posts on channel profiles (#5634)

This commit is contained in:
LisoUseInAIKyrios
2025-08-10 09:09:08 -04:00
committed by GitHub
parent ff4308e961
commit 61824ade23

View File

@@ -32,6 +32,7 @@ public final class LayoutComponentsFilter extends Filter {
);
private final StringTrieSearch exceptions = new StringTrieSearch();
private final StringFilterGroup communityPosts;
private final StringFilterGroup surveys;
private final StringFilterGroup notifyMe;
private final StringFilterGroup singleItemInformationPanel;
@@ -68,7 +69,7 @@ public final class LayoutComponentsFilter extends Filter {
// Paths.
final var communityPosts = new StringFilterGroup(
communityPosts = new StringFilterGroup(
Settings.HIDE_COMMUNITY_POSTS,
"post_base_wrapper", // may be obsolete and no longer needed.
"text_post_root.eml",
@@ -325,6 +326,12 @@ public final class LayoutComponentsFilter extends Filter {
return channelProfileBuffer.check(buffer).isFiltered();
}
if (matchedGroup == communityPosts && NavigationBar.isBackButtonVisible()) {
// Allow community posts on channel profile page,
// or if viewing an individual channel in the feed.
return false;
}
if (exceptions.matches(path)) return false; // Exceptions are not filtered.
if (matchedGroup == compactChannelBarInner) {