From afd9da0356e6797f052275e32c6627585f5ae912 Mon Sep 17 00:00:00 2001 From: Aaron Veil <70171475+anddea@users.noreply.github.com> Date: Tue, 15 Oct 2024 14:08:41 +0300 Subject: [PATCH] fix(YouTube - Hide feed components): `Hide UPCOMING video` setting now only hides the video when the thumbnail can be hidden --- .../patches/components/FeedVideoFilter.java | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/app/src/main/java/app/revanced/integrations/youtube/patches/components/FeedVideoFilter.java b/app/src/main/java/app/revanced/integrations/youtube/patches/components/FeedVideoFilter.java index fea272bc91..74a3714d87 100644 --- a/app/src/main/java/app/revanced/integrations/youtube/patches/components/FeedVideoFilter.java +++ b/app/src/main/java/app/revanced/integrations/youtube/patches/components/FeedVideoFilter.java @@ -21,7 +21,11 @@ public final class FeedVideoFilter extends Filter { // In search results, vertical video with shorts labels mostly include videos with gray descriptions. // Filters without check process. private final StringFilterGroup inlineShorts; - private final StringFilterGroup videoLockup; + // Used for home, related videos, subscriptions, and search results. + private final StringFilterGroup videoLockup = new StringFilterGroup( + null, + "video_lockup_with_attachment.eml" + ); private final ByteArrayFilterGroupList feedAndDrawerGroupList = new ByteArrayFilterGroupList(); private final ByteArrayFilterGroupList feedOnlyGroupList = new ByteArrayFilterGroupList(); private final StringFilterGroupList videoLockupFilterGroup = new StringFilterGroupList(); @@ -41,12 +45,6 @@ public FeedVideoFilter() { addIdentifierCallbacks(inlineShorts); - // Used for home, related videos, subscriptions, and search results. - videoLockup = new StringFilterGroup( - null, - "video_lockup_with_attachment.eml" - ); - addPathCallbacks(videoLockup); feedAndDrawerGroupList.addAll( @@ -54,10 +52,6 @@ public FeedVideoFilter() { Settings.HIDE_RECOMMENDED_VIDEO, ENDORSEMENT_FOOTER_PATH, // videos with gray descriptions "high-ptsZ" // videos for membership only - ), - new ByteArrayFilterGroup( - Settings.HIDE_UPCOMING_VIDEO, - "set_reminder_button" // upcoming videos ) ); @@ -65,6 +59,11 @@ public FeedVideoFilter() { new ByteArrayFilterGroup( Settings.HIDE_LOW_VIEWS_VIDEO, "g-highZ" // videos with less than 1000 views + ), + new ByteArrayFilterGroup( + Settings.HIDE_UPCOMING_VIDEO, + "ic_play_disabled_white", + "set_reminder_button" // upcoming videos ) );