From c5d38a7e0791ebb8fe59397fff959cc94e0a7aed Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Sun, 7 Apr 2024 20:14:29 +0400 Subject: [PATCH] fix(YouTube - Hide layout components): Do not hide playlist shelf in library --- .../patches/components/LayoutComponentsFilter.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/app/revanced/integrations/youtube/patches/components/LayoutComponentsFilter.java b/app/src/main/java/app/revanced/integrations/youtube/patches/components/LayoutComponentsFilter.java index a22ff004..ea1369a0 100644 --- a/app/src/main/java/app/revanced/integrations/youtube/patches/components/LayoutComponentsFilter.java +++ b/app/src/main/java/app/revanced/integrations/youtube/patches/components/LayoutComponentsFilter.java @@ -281,6 +281,7 @@ public final class LayoutComponentsFilter extends Filter { if (searchResultRecommendations.check(protobufBufferArray).isFiltered()) { return super.isFiltered(identifier, path, protobufBufferArray, matchedGroup, contentType, contentIndex); } + return false; } // The groups are excluded from the filter due to the exceptions list below. @@ -307,8 +308,12 @@ public final class LayoutComponentsFilter extends Filter { // TODO: This also hides the feed Shorts shelf header if (matchedGroup == searchResultShelfHeader && contentIndex != 0) return false; - if (contentIndex == 0 && matchedGroup == horizontalShelves && hideShelves()) { - return super.isFiltered(path, identifier, protobufBufferArray, matchedGroup, contentType, contentIndex); + if (matchedGroup == horizontalShelves) { + if (contentIndex == 0 && hideShelves()) { + return super.isFiltered(path, identifier, protobufBufferArray, matchedGroup, contentType, contentIndex); + } + + return false; } return super.isFiltered(identifier, path, protobufBufferArray, matchedGroup, contentType, contentIndex);