Skip to content

Commit

Permalink
feat(YouTube - Hide feed components): Remove obsolete `Hide search re…
Browse files Browse the repository at this point in the history
…sult shelf header` option (#4134)
  • Loading branch information
ILoveOpenSourceApplications authored Dec 16, 2024
1 parent 87b09f9 commit c71443a
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ public final class LayoutComponentsFilter extends Filter {
);

private final StringTrieSearch exceptions = new StringTrieSearch();
private final StringFilterGroup searchResultShelfHeader;
private final StringFilterGroup inFeedSurvey;
private final StringFilterGroup notifyMe;
private final StringFilterGroup expandableMetadata;
Expand Down Expand Up @@ -194,11 +193,6 @@ public LayoutComponentsFilter() {
"timed_reaction"
);

searchResultShelfHeader = new StringFilterGroup(
Settings.HIDE_SEARCH_RESULT_SHELF_HEADER,
"shelf_header.eml"
);

notifyMe = new StringFilterGroup(
Settings.HIDE_NOTIFY_ME_BUTTON,
"set_reminder_button"
Expand Down Expand Up @@ -324,9 +318,6 @@ boolean isFiltered(@Nullable String identifier, String path, byte[] protobufBuff
return false;
}

// TODO: This also hides the feed Shorts shelf header
if (matchedGroup == searchResultShelfHeader && contentIndex != 0) return false;

if (matchedGroup == horizontalShelves) {
if (contentIndex == 0 && hideShelves()) {
return super.isFiltered(path, identifier, protobufBufferArray, matchedGroup, contentType, contentIndex);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ public class Settings extends BaseSettings {
public static final BooleanSetting HIDE_NOTIFY_ME_BUTTON = new BooleanSetting("revanced_hide_notify_me_button", TRUE);
public static final BooleanSetting HIDE_PLAYABLES = new BooleanSetting("revanced_hide_playables", TRUE);
public static final BooleanSetting HIDE_SEARCH_RESULT_RECOMMENDATIONS = new BooleanSetting("revanced_hide_search_result_recommendations", TRUE);
public static final BooleanSetting HIDE_SEARCH_RESULT_SHELF_HEADER = new BooleanSetting("revanced_hide_search_result_shelf_header", FALSE);
public static final BooleanSetting HIDE_SHOW_MORE_BUTTON = new BooleanSetting("revanced_hide_show_more_button", TRUE, true);
// Alternative thumbnails
public static final EnumSetting<ThumbnailOption> ALT_THUMBNAIL_HOME = new EnumSetting<>("revanced_alt_thumbnail_home", ThumbnailOption.ORIGINAL);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@ val hideLayoutComponentsPatch = bytecodePatch(
SwitchPreference("revanced_hide_notify_me_button"),
SwitchPreference("revanced_hide_playables"),
SwitchPreference("revanced_hide_search_result_recommendations"),
SwitchPreference("revanced_hide_search_result_shelf_header"),
SwitchPreference("revanced_hide_show_more_button"),
SwitchPreference("revanced_hide_doodles"),
)
Expand Down
3 changes: 0 additions & 3 deletions patches/src/main/resources/addresources/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,6 @@ You will not be notified of any unexpected events."</string>
<string name="revanced_hide_timed_reactions_title">Hide timed reactions</string>
<string name="revanced_hide_timed_reactions_summary_on">Timed reactions are hidden</string>
<string name="revanced_hide_timed_reactions_summary_off">Timed reactions are shown</string>
<string name="revanced_hide_search_result_shelf_header_title">Hide search result shelf header</string>
<string name="revanced_hide_search_result_shelf_header_summary_on">Shelf header is hidden</string>
<string name="revanced_hide_search_result_shelf_header_summary_off">Shelf header is shown</string>
<string name="revanced_hide_channel_guidelines_title">Hide channel guidelines</string>
<string name="revanced_hide_channel_guidelines_summary_on">Channel guidelines are hidden</string>
<string name="revanced_hide_channel_guidelines_summary_off">Channel guidelines are shown</string>
Expand Down

0 comments on commit c71443a

Please sign in to comment.